Permalink
Browse files

Bug 743845 - Fix ordering-related test failures in environment.

  • Loading branch information...
1 parent 4b393f1 commit 99ccd5be0f99e32fcf9675fe244890e619c20265 @rfk rfk committed Apr 10, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 aitc/tests/functional/test_aitc.py
@@ -222,7 +222,11 @@ def test_listing_of_full_app_records(self):
# With "full" we get the full data output.
apps = self.app.get(self.root + "/apps/?full=1").json["apps"]
self.assertEquals(len(apps), 2)
- for app, data in zip(apps, (data1, data2)):
+ # Sort the apps and output by origin so we easily compare in a loop.
+ apps = [(app["origin"], app) for app in apps]
+ apps = [app for (origin, app) in sorted(apps)]
+ # Make sure we got *all* the data back correctly.
+ for app, data in zip(apps, [data2, data1]):
del app["modifiedAt"]
self.assertEquals(app, data)

0 comments on commit 99ccd5b

Please sign in to comment.