Commits

Faheem Mitha  committed 8cbc7a1

Update testZipFileValidate.

  • Participants
  • Parent commits 19f39ff

Comments (0)

Files changed (1)

                 os.mkdir(dummydir)
             response = self.c.post(reverse('validate'))
             self.assertTrue(dummydir in response._container[0])
+            self.assertTrue("The directories in the database and on the filesystem are not the same." in response._container[0])
+            self.assertTrue("These directories are on the filesystem and not in the database:" in response._container[0])
+            self.assertTrue("/tmp/upload/dummydir" in response._container[0])
+            self.assertTrue("The files in the database and on the filesystem are the same." in response._container[0])
             if os.path.isdir(dummydir):
                 os.rmdir(dummydir)
             foo = os.path.join(settings.MEDIA_ROOT, settings.BIXFILE_UPLOAD, "foo")
             f.write("overwritten foo")
             f.close()
             response = self.c.post(reverse('validate'))
-            self.assertTrue(foo in response._container[0])
+            self.assertTrue("The directories in the database and on the filesystem are the same." in response._container[0])
+            self.assertTrue("The files in the database and on the filesystem are the same." in response._container[0])
+            self.assertTrue("The md5sums of these files which are both on the file system and recorded in the database do not agree:" in response._container[0])
+            self.assertTrue("/tmp/upload/foo" in response._container[0])
         except:
             if os.path.isdir(dummydir):
                 os.rmdir(dummydir)