| @@ 27-45 (lines=19) @@ | ||
| 24 | "biosample/managedteam.json" |
|
| 25 | ] |
|
| 26 | ||
| 27 | def setUp(self): |
|
| 28 | User = get_user_model() |
|
| 29 | ||
| 30 | # create a testuser |
|
| 31 | user = User.objects.create_user( |
|
| 32 | username='test', |
|
| 33 | password='test', |
|
| 34 | email="[email protected]") |
|
| 35 | ||
| 36 | team = ManagedTeam.objects.get(name="subs.test-team-1") |
|
| 37 | Account.objects.create( |
|
| 38 | user=user, team=team, name="image-test") |
|
| 39 | ||
| 40 | self.client = Client() |
|
| 41 | self.client.login(username='test', password='test') |
|
| 42 | ||
| 43 | # get the url for dashboard |
|
| 44 | self.url = reverse('biosample:token') |
|
| 45 | self.response = self.client.get(self.url) |
|
| 46 | ||
| 47 | def check_messages(self, response, tag, message_text): |
|
| 48 | """Check that a response has warnings""" |
|
| @@ 30-48 (lines=19) @@ | ||
| 27 | "biosample/managedteam" |
|
| 28 | ] |
|
| 29 | ||
| 30 | def setUp(self): |
|
| 31 | User = get_user_model() |
|
| 32 | ||
| 33 | # create a testuser |
|
| 34 | user = User.objects.create_user( |
|
| 35 | username='test', |
|
| 36 | password='test', |
|
| 37 | email="[email protected]") |
|
| 38 | ||
| 39 | team = ManagedTeam.objects.get(name="subs.test-team-1") |
|
| 40 | Account.objects.create( |
|
| 41 | user=user, team=team, name="image-test") |
|
| 42 | ||
| 43 | self.client = Client() |
|
| 44 | self.client.login(username='test', password='test') |
|
| 45 | ||
| 46 | # get the url for dashboard |
|
| 47 | self.url = reverse('biosample:token-generation') |
|
| 48 | self.response = self.client.get(self.url) |
|
| 49 | ||
| 50 | def check_messages(self, response, tag, message_text): |
|
| 51 | """Check that a response has warnings""" |
|