Skip to content
Snippets Groups Projects
Commit d47b39fe authored by Damian Johnson's avatar Damian Johnson
Browse files

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
parent a4089b9b
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment