Skip to content

Commit

Permalink
#19 SiteManager was renamed to OFMSiteManager
Browse files Browse the repository at this point in the history
  • Loading branch information
StegSchreck committed Apr 30, 2017
1 parent b082f24 commit 86e93fa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/tests/unit/test_parser_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ def setUp(self):

@patch('core.parsers.ofm_helper_version_parser.OfmHelperVersionParser.parse')
def test_parse_ofm_version(self, parse_version_mock):
with patch('core.managers.site_manager.SiteManager') as site_manager_mock:
with patch('core.managers.site_manager.OFMSiteManager') as site_manager_mock:
site_manager_mock.browser.page_source.return_value = "<html></html>"
self.parser_manager.parse_ofm_version(site_manager_mock)

assert parse_version_mock.called

@patch('core.parsers.matchday_parser.MatchdayParser.parse')
def test_parse_matchday(self, parse_matchday_mock):
with patch('core.managers.site_manager.SiteManager') as site_manager_mock:
with patch('core.managers.site_manager.OFMSiteManager') as site_manager_mock:
site_manager_mock.browser.page_source.return_value = "<html></html>"
self.parser_manager.parse_matchday(site_manager_mock)

Expand All @@ -27,7 +27,7 @@ def test_parse_matchday(self, parse_matchday_mock):
@patch('core.managers.parser_manager.ParserManager.parse_matchday')
@patch('core.parsers.players_parser.PlayersParser.parse')
def test_parse_players_and_matchday(self, parse_players_mock, parse_matchday_mock):
with patch('core.managers.site_manager.SiteManager') as site_manager_mock:
with patch('core.managers.site_manager.OFMSiteManager') as site_manager_mock:
site_manager_mock.browser.page_source.return_value = "<html></html>"
self.parser_manager.parse_players(site_manager_mock)

Expand All @@ -38,7 +38,7 @@ def test_parse_players_and_matchday(self, parse_players_mock, parse_matchday_moc
@patch('core.parsers.player_statistics_parser.PlayerStatisticsParser.parse')
def test_parse_player_statistics(self, parse_player_statistics_mock, parse_matchday_mock):
self.parser_manager.players_already_parsed = True
with patch('core.managers.site_manager.SiteManager') as site_manager_mock:
with patch('core.managers.site_manager.OFMSiteManager') as site_manager_mock:
site_manager_mock.browser.page_source.return_value = "<html></html>"
self.parser_manager.parse_player_statistics(site_manager_mock)

Expand All @@ -48,7 +48,7 @@ def test_parse_player_statistics(self, parse_player_statistics_mock, parse_match
@patch('core.managers.parser_manager.ParserManager.parse_players')
@patch('core.parsers.player_statistics_parser.PlayerStatisticsParser.parse')
def test_parse_player_statistics_and_matchday(self, parse_player_statistics_mock, parse_players_mock):
with patch('core.managers.site_manager.SiteManager') as site_manager_mock:
with patch('core.managers.site_manager.OFMSiteManager') as site_manager_mock:
site_manager_mock.browser.page_source.return_value = "<html></html>"
self.parser_manager.parse_player_statistics(site_manager_mock)

Expand All @@ -58,7 +58,7 @@ def test_parse_player_statistics_and_matchday(self, parse_player_statistics_mock
@patch('core.managers.parser_manager.ParserManager.parse_matchday')
@patch('core.parsers.awp_boundaries_parser.AwpBoundariesParser.parse')
def test_parse_awp_and_matchday(self, parse_awp_mock, parse_matchday_mock):
with patch('core.managers.site_manager.SiteManager') as site_manager_mock:
with patch('core.managers.site_manager.OFMSiteManager') as site_manager_mock:
site_manager_mock.browser.page_source.return_value = "<html></html>"
self.parser_manager.parse_awp_boundaries(site_manager_mock)

Expand All @@ -68,7 +68,7 @@ def test_parse_awp_and_matchday(self, parse_awp_mock, parse_matchday_mock):
@patch('core.managers.parser_manager.ParserManager.parse_matchday')
@patch('core.parsers.finances_parser.FinancesParser.parse')
def test_parse_finances_and_matchday(self, parse_finances_mock, parse_matchday_mock):
with patch('core.managers.site_manager.SiteManager') as site_manager_mock:
with patch('core.managers.site_manager.OFMSiteManager') as site_manager_mock:
site_manager_mock.browser.page_source.return_value = "<html></html>"
self.parser_manager.parse_finances(site_manager_mock)

Expand Down

0 comments on commit 86e93fa

Please sign in to comment.