Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 def test_error_open_log(self):
     log = game_score.open_log('x' + 'test.log')
     self.assertEqual(log, config.ERROR_OPEN_FILE)
Esempio n. 5
0
 def test_open_log(self):
     log = game_score.open_log('test.log')
     self.assertEqual(type(log), list)
Esempio n. 6
0
 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')
Esempio n. 7
0
 def create_match(self):
     log = game_score.open_log('test.log')
     match = game_score.create_match(log)
     return match