diff options
| author | Damian Johnson <atagar@torproject.org> | 2014-12-24 09:12:07 -0800 |
|---|---|---|
| committer | Damian Johnson <atagar@torproject.org> | 2014-12-24 09:12:07 -0800 |
| commit | d47b39fef9b31277be5706491d66011fe006e611 (patch) | |
| tree | fe5c634c4c7f13000d690809681b6ec6463af9d5 | |
| parent | a4089b9bf4a79d7aad2d00be083da2555c4682e1 (diff) | |
Using an OrderedDict with tutorial example
Oops, our tutorial example should be using an OrderedDict rather than dict so
we can be assured that the end result will match the expected string. Spotted
by Foxboron...
https://trac.torproject.org/projects/tor/ticket/14016#comment:2
| -rw-r--r-- | test/unit/tutorial_examples.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/tutorial_examples.py b/test/unit/tutorial_examples.py index 75a480de..0a64bff5 100644 --- a/test/unit/tutorial_examples.py +++ b/test/unit/tutorial_examples.py @@ -2,6 +2,7 @@ Tests for the examples given in stem's tutorial. """ +import collections import itertools import StringIO import unittest @@ -279,7 +280,7 @@ class TestTutorialExamples(unittest.TestCase): # Query all authority votes asynchronously. downloader = remote.DescriptorDownloader(document_handler = DocumentHandler.DOCUMENT) - queries = {} + queries = collections.OrderedDict() # needed so output's order matches what's expected for name, authority in remote.get_authorities().items(): if authority.v3ident is None: |
