Do not depend on dictionary order in unit tests.

Reviewed in http://coderview.appspot.com/6446167/.
This commit is contained in:
Joe Gregorio
2012-08-21 15:48:49 -04:00
parent bb8677eb8a
commit d688b6c1da

View File

@@ -55,7 +55,8 @@ class SchemasTest(unittest.TestCase):
self.sc = Schemas(discovery)
def test_basic_formatting(self):
self.assertEqual(LOAD_FEED, self.sc.prettyPrintByName('LoadFeed'))
self.assertEqual(sorted(LOAD_FEED.splitlines()),
sorted(self.sc.prettyPrintByName('LoadFeed').splitlines()))
def test_empty_edge_case(self):
self.assertTrue('Unknown type' in self.sc.prettyPrintSchema({}))