def test_bb_run_id(self): # We know that 9 is max_time max_time = 9 db_class = Database(self.options_db) bb_runid = db_class.buildbot_run_id(max_time) self.assertEqual(bb_runid, str(max_time))
def test_bb_run_id(self): # We know that 9 is max_time max_time = 9 db_class = Database(self.options_db) bb_runid = db_class.buildbot_run_id(max_time) self.assertEqual(bb_runid, str(max_time))
def test_violations(self): max_time = 9 db_class = Database(self.options_db) all_violating_tests = db_class.all_violating_tests(max_time) self.assertEqual(len(all_violating_tests), 2) for test in all_violating_tests: self.assertEqual(test.method_type, 'test')
def test_violations(self): max_time = 9 db_class = Database(self.options_db) all_violating_tests = db_class.all_violating_tests(max_time) self.assertEqual(len(all_violating_tests), 2) for test in all_violating_tests: self.assertEqual(test.method_type, 'test')
def test_build_dict(self): """Test that the data structure is correct""" # Build the proper data structure proper_response = {} for test in range(1, 10): test_name_part = u'test' + unicode(test) name = "%s %s.%s" % (u'test', test_name_part, test_name_part) if test == 2 or test == 3: proper_response[name] = False else: proper_response[name] = True db_class = Database(self.options_db) unittest = db_class.build_dict() self.assertEqual(unittest, proper_response)
def test_build_dict(self): """Test that the data structure is correct""" # Build the proper data structure proper_response = {} for test in range(1, 10): test_name_part = u'test' + unicode(test) name = "%s %s.%s" % (u'test', test_name_part, test_name_part) if test == 2 or test == 3: proper_response[name] = False else: proper_response[name] = True db_class = Database(self.options_db) unittest = db_class.build_dict() self.assertEqual(unittest, proper_response)
def test_all_tests(self): db_class = Database(self.options_db) all_tests = db_class.all_tests(9) self.assertEqual(len(all_tests), 9)
def test_last_time_of_catbox_run(self): db_class = Database(self.options_db) last_time = db_class.last_time_of_catbox_run() # Find actual last time self.assertEqual(last_time, 9)
def test_all_tests(self): db_class = Database(self.options_db) all_tests = db_class.all_tests(9) self.assertEqual(len(all_tests), 9)
def test_last_time_of_catbox_run(self): db_class = Database(self.options_db) last_time = db_class.last_time_of_catbox_run() # Find actual last time self.assertEqual(last_time, 9)