Private
Public Access
1
0

making pass tests

This commit is contained in:
Sander Roosendaal
2020-01-15 20:50:16 +01:00
parent 8683d8eaa4
commit 86869f595e
4 changed files with 14 additions and 13 deletions

View File

@@ -1112,21 +1112,22 @@ class PermissionsViewTests(TestCase):
## Pro cannot run analytics on behalf of athlete
@patch('rowers.dataprep.read_cols_df_sql', side_effect = mocked_read_df_cols_sql_multistats)
def test_pro_edit_athlete_analysis(self,mocked_df):
self.rpro.team.add(self.teampro)
with transaction.atomic():
self.rpro.team.add(self.teampro)
login = self.c.login(username=self.upro2.username, password=self.upro2password)
self.assertTrue(login)
login = self.c.login(username=self.upro2.username, password=self.upro2password)
self.assertTrue(login)
url = reverse('cumstats',
kwargs={
'theuser':self.ubasic.id,
}
)
url = reverse('cumstats',
kwargs={
'theuser':self.ubasic.id,
}
)
response = self.c.get(url)
response = self.c.get(url)
self.assertEqual(response.status_code,403)
self.assertEqual(response.status_code,403)
## Self Coach cannot upload on behalf of athlete
@patch('rowers.dataprep.create_engine')