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 | c869864780439cdc52618b31ca3b76b4af6eadee (patch) | |
tree | 034ee41104b1a7782e76bce33926f0d881ee0183 /tests | |
parent | ea2cf6f6253852587f2d9e00ffd658f076981413 (diff) | |
download | paste-c869864780439cdc52618b31ca3b76b4af6eadee.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 |