Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix some tests broken with last commit
Roland Geider263d1631dc70
diff --git a/wger/config/tests/test_gym_config.py b/wger/config/tests/test_gym_config.pyindex 3b5cf2891..4b89929c0 100644--- a/wger/config/tests/test_gym_config.py+++ b/wger/config/tests/test_gym_config.py@@ -46,7 +46,7 @@ class GymConfigTestCase(WorkoutManagerTestCase):'email': '[email protected]','recaptcha_response_field': 'PASSED', }self.client.post(reverse('core:registration'), registration_data)- new_user = User.objects.get(pk=14)+ new_user = User.objects.all().last()self.assertEqual(new_user.userprofile.gym, gym)@@ -68,7 +68,7 @@ class GymConfigTestCase(WorkoutManagerTestCase):'recaptcha_response_field': 'PASSED', }self.client.post(reverse('core:registration'), registration_data)- new_user = User.objects.get(pk=14)+ new_user = User.objects.all().last()self.assertEqual(new_user.userprofile.gym_id, None)def test_update_userprofile(self):@@ -84,4 +84,4 @@ class GymConfigTestCase(WorkoutManagerTestCase):gym_config.default_gym = gymgym_config.save()- self.assertEqual(UserProfile.objects.filter(gym=gym).count(), 13)+ self.assertEqual(UserProfile.objects.filter(gym=gym).count(), 24)diff --git a/wger/gym/tests/test_gym.py b/wger/gym/tests/test_gym.pyindex 3c2fc7948..364f65fe0 100644--- a/wger/gym/tests/test_gym.py+++ b/wger/gym/tests/test_gym.py@@ -82,7 +82,7 @@ class GymTestCase(WorkoutManagerTestCase):Tests that deleting a gym also removes it from all user profiles'''gym = Gym.objects.get(pk=1)- self.assertEqual(UserProfile.objects.filter(gym=gym).count(), 8)+ self.assertEqual(UserProfile.objects.filter(gym=gym).count(), 17)gym.delete()self.assertEqual(UserProfile.objects.filter(gym=gym).count(), 0)