def setUp(self): self.user = UserFactory(username='******', password='******') self.other_user = UserFactory(username='******', password='******') self.action = ActionFactory(user=self.user) self.action1 = ActionFactory(user=self.other_user) actions = [self.action, self.action1] for action in actions: for _ in range(1, 10): RecordFactory(action=action) self.url = '/records'
def setUp(self): self.user = UserFactory(username='******', password='******') self.other = UserFactory(username='******', password='******') self.action = ActionFactory(user=self.user) self.goal = GoalFactory(action=self.action) self.url = '/goal/update/action/{}'.format( self.action.id) self.object = {'action': self.action, 'daily_value': 100}
class ActionTest(TestCase): def setUp(self): self.action = ActionFactory() def test_str(self): self.assertEqual(self.action.__str__(), '{} ({})'.format( self.action.text, self.action.unit ))
def setUp(self): self.user = UserFactory(username='******', password='******') self.other_user = UserFactory(username='******', password='******') users = [self.user, self.other_user] for user in users: for _ in range(1, 10): ActionFactory(user=user) self.url = '/actions'
def setUp(self): self.user = UserFactory(username='******', password='******') self.other_user = UserFactory(username='******', password='******') self.object = { 'text': 'Book Reading', 'color': 1, 'unit': 'pages', 'user': self.user } self.action = ActionFactory(**self.object) self.url = '/record-create' self.new_record = {'action': self.action.id, 'value': 100}
def setUp(self): self.user = UserFactory(username='******', password='******') self.other_user = UserFactory(username='******', password='******') self.object = {'text': 'Action', 'color': 2, 'unit': 'unit'} self.action = ActionFactory(user=self.user, **self.object) self.update_object = { 'text': 'Book Reading', 'color': 1, 'unit': 'pages' } self.url = '/action-update/{}'.format(self.action.id)
def setUp(self): self.user = UserFactory(username='******', password='******') self.action = ActionFactory(user=self.user)
def setUp(self): self.action = ActionFactory()
def setUp(self): self.user = UserFactory(username='******', password='******') self.other_user = UserFactory(username='******', password='******') self.action = ActionFactory(user=self.user) self.url = '/action-delete/{}'.format(self.action.id)