예제 #1
0
def _run_databasesanity(objects):
    try:
        databasesanity.check_sanity(objects, quiet=True,
                                    really_quiet=(not util.chatter))
    except databasesanity.DatabaseInsaneError, e:
        logging.warn("Old database fails sanity test: %s", e)
        objects[:] = []
예제 #2
0
def _run_databasesanity(objects):
    try:
        databasesanity.check_sanity(objects,
                                    quiet=True,
                                    really_quiet=(not util.chatter))
    except databasesanity.DatabaseInsaneError, e:
        logging.warn("Old database fails sanity test: %s", e)
        objects[:] = []
예제 #3
0
 def test_manual_feed_checking(self):
     f = feed.Feed(u"dtv:manualFeed")
     f2 = feed.Feed(u"dtv:manualFeed")
     f3 = feed.Feed(u"dtv:manualFeed")
     self.check_object_list_passes_test([f])
     self.check_object_list_fails_test([f, f2])
     self.error_signal_okay = True
     test_list = [f, f2, f3]
     databasesanity.check_sanity(test_list)
     self.assertEquals(len(test_list), 1)
     self.assertEquals(self.saw_error, True)
예제 #4
0
 def test_manual_feed_checking(self):
     f = feed.Feed(u"dtv:manualFeed")
     f2 = feed.Feed(u"dtv:manualFeed")
     f3 = feed.Feed(u"dtv:manualFeed")
     self.check_object_list_passes_test([f])
     self.check_object_list_fails_test([f, f2])
     self.error_signal_okay = True
     test_list = [f, f2, f3]
     databasesanity.check_sanity(test_list)
     self.assertEquals(len(test_list), 1)
     self.assertEquals(self.saw_error, True)
예제 #5
0
 def check_object_list_passes_test(self, object_list):
     databasesanity.check_sanity(object_list)
예제 #6
0
 def check_fix_if_possible(self, start_list, fixed_list):
     self.error_signal_okay = True
     rv = databasesanity.check_sanity(start_list)
     self.assertEquals(start_list, fixed_list)
     self.assertEquals(rv, False)
     self.assertEquals(self.saw_error, True)
예제 #7
0
 def check_object_list_passes_test(self, object_list):
     databasesanity.check_sanity(object_list)
예제 #8
0
 def check_fix_if_possible(self, start_list, fixed_list):
     self.error_signal_okay = True
     rv = databasesanity.check_sanity(start_list)
     self.assertEquals(start_list, fixed_list)
     self.assertEquals(rv, False)
     self.assertEquals(self.saw_error, True)