Skip to content

Commit

Permalink
#99 don't use _meta from models
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh4kE committed Dec 10, 2016
1 parent 2cd6997 commit cb280ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/tests/unit/parser/test_player_statistics_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def setUp(self):
user = OFMUserFactory.create()
season = SeasonFactory.create()

country_choices = dict(Country._meta.get_field('country').choices)
country_no_greece = list(country_choices.keys())[list(country_choices.values()).index('Griechenland')]
nationality_greece, _ = Country.objects.get_or_create(country=country_no_greece)
country_choices = Country.get_choices()
country_iso_greece = list(country_choices.keys())[list(country_choices.values()).index('Griechenland')]
nationality_greece, _ = Country.objects.get_or_create(country=country_iso_greece)

self.player = Player.objects.create(
id='159883060',
Expand Down
2 changes: 2 additions & 0 deletions core/tests/unit/test_core_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def test_create_finance(self):
self.assertTrue(f.matchday is not None)

self.assertEqual(f.balance, 1000)

self.assertEqual(f.income_visitors_league, 100)
self.assertEqual(f.income_sponsoring, 0)
self.assertEqual(f.income_cup, 0)
Expand All @@ -129,6 +130,7 @@ def test_create_finance(self):
self.assertEqual(f.income_friendlies, 0)
self.assertEqual(f.income_funcup, 0)
self.assertEqual(f.income_betting, 0)

self.assertEqual(f.expenses_player_salaries, 100)
self.assertEqual(f.expenses_stadium, 0)
self.assertEqual(f.expenses_youth, 0)
Expand Down

0 comments on commit cb280ed

Please sign in to comment.