diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:48:42 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:48:42 +0100 |
commit | d83aa177e286a50e3e50c6d4575df883c70de849 (patch) | |
tree | 034ee41104b1a7782e76bce33926f0d881ee0183 /tests | |
parent | 7774cd4289ce95b4df3bf545a759fecea22a24c7 (diff) | |
download | paste-git-d83aa177e286a50e3e50c6d4575df883c70de849.tar.gz |
Python 3: convert dict.keys() result to list to get the first item
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_registry.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_registry.py b/tests/test_registry.py index dfece6a..fdbc26c 100644 --- a/tests/test_registry.py +++ b/tests/test_registry.py @@ -180,7 +180,7 @@ def _test_restorer(stack, data): # Ensure all the StackedObjectProxies are empty after the RegistryUsingApp # raises an Exception for stacked, proxied_obj, test_cleanup in data: - only_key = proxied_obj.keys()[0] + only_key = list(proxied_obj.keys())[0] try: assert only_key not in stacked assert False @@ -196,7 +196,7 @@ def _test_restorer(stack, data): try: for stacked, proxied_obj, test_cleanup in data: # Ensure our original data magically re-appears in this context - only_key, only_val = proxied_obj.items()[0] + only_key, only_val = list(proxied_obj.items())[0] assert only_key in stacked and stacked[only_key] == only_val # Ensure the Registry still works |