diff options
author | ohemorange <ebportnoy@gmail.com> | 2019-11-27 02:25:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-27 02:25:41 +0300 |
commit | d2b65b47f2e2968df62e0feea5ebf28bfdd3e4b2 (patch) | |
tree | 9c686c839091476d244237c75e58e90d818ef5a7 /acme/tests/util_test.py | |
parent | b624172f6827b35214bc3a2df076df0bc524cba2 (diff) |
Refactor tests out of packaged module for acme plugin (#7600)
* Move acme tests to tests/ directory outside of acme module
* Fix call to messages_test in client_test
* Move test_util.py and testdata/ into tests/
* Update manifest to package tests
* Exclude pycache and .py[cod]
Diffstat (limited to 'acme/tests/util_test.py')
-rw-r--r-- | acme/tests/util_test.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/acme/tests/util_test.py b/acme/tests/util_test.py new file mode 100644 index 000000000..00aa8b02d --- /dev/null +++ b/acme/tests/util_test.py @@ -0,0 +1,16 @@ +"""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 |