Commits

Anonymous committed feaedb2

Fixed bug in tests

Comments (0)

Files changed (1)

         self.provider = FileBasedContentProvider(
             'file://%s/example*.xml' % path)
         self.db = Database()
-        
+
     def tearDown(self):
         del self.provider
         del self.db
-        
+
     def test_provider_update(self):
-        self.assertEquals([id for id in self.provider.update()],
+        self.assertEquals(sorted([id for id in self.provider.update()]),
                           ['example-1234.xml', 'example-2345.xml'])
 
     def test_provider_content(self):
-        self.assertEquals([id for id in self.provider.update()],
+        self.assertEquals(sorted([id for id in self.provider.update()]),
                           ['example-1234.xml', 'example-2345.xml'])
         for content_id in self.provider.get_content_ids():
             raw_data = self.provider.get_content_by_id(content_id)
                                   content.metadata)
         self.db.flush()
         self.assertEquals(self.db.record_count(), 2)
-        
-        
+
+
 class ServerTest(TestCase):
     def setUp(self):
         self.db = Database()
         self.assertEquals(xpath.strings('//oai:identifier'),
                           [u'oai:spamspamspam'])
 
+
 def suite():    
     test_suite = TestSuite()
     test_suite.addTest(makeSuite(XPathUtilTest))