mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 22:08:07 -04:00
17 lines
456 B
Python
17 lines
456 B
Python
|
|
"""Tests for acme.util."""
|
||
|
|
import unittest
|
||
|
|
|
||
|
|
|
||
|
|
class MapKeysTest(unittest.TestCase):
|
||
|
|
"""Tests for acme.util.map_keys."""
|
||
|
|
|
||
|
|
def test_it(self):
|
||
|
|
from acme.util import map_keys
|
||
|
|
self.assertEqual({'a': 'b', 'c': 'd'},
|
||
|
|
map_keys({'a': 'b', 'c': 'd'}, lambda key: key))
|
||
|
|
self.assertEqual({2: 2, 4: 4}, map_keys({1: 2, 3: 4}, lambda x: x + 1))
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
unittest.main() # pragma: no cover
|