def test_create_match_error(self): log = game_score.open_log('test.log') log = log[1:] match = game_score.create_match(log) self.assertEqual(match, config.ERROR_FILE_CONFIG)
def test_final_score_error_on_log(self): log = game_score.open_log('log_with_error.log') match = game_score.create_match(log) result = game_score.final_score(match, log) self.assertEqual(result, config.ERROR_FILE_CONFIG)
def test_create_match_from_game_score(self): log = game_score.open_log('test.log') match = game_score.create_match(log) id = log[0].split(' ')[5] self.assertEqual(id, match.id)
def test_error_open_log(self): log = game_score.open_log('x' + 'test.log') self.assertEqual(log, config.ERROR_OPEN_FILE)
def test_open_log(self): log = game_score.open_log('test.log') self.assertEqual(type(log), list)
def test_final_score(self): log = game_score.open_log('complete_match.log') match = game_score.create_match(log) result = game_score.final_score(match, log) self.assertEqual(result, 'Success')
def create_match(self): log = game_score.open_log('test.log') match = game_score.create_match(log) return match