def setUpClass(cls): super().setUpClass() cls.url = '/api/stores/' # two groups one store cls.member = User() cls.group = Group(members=[cls.member, ]) cls.group2 = Group(members=[cls.member, ]) cls.store = Store(group=cls.group) cls.store2 = Store(group=cls.group2)
def setUpClass(cls): super().setUpClass() cls.url = '/api/pickup-dates/' # pickup date for group with one member and one store cls.member = User() cls.group = Group(members=[cls.member, ]) cls.store = Store(group=cls.group) cls.pickup = PickupDate(store=cls.store) # and another store + group + pick-update cls.group2 = Group(members=[cls.member, ]) cls.store2 = Store(group=cls.group2) cls.pickup2 = PickupDate(store=cls.store2)
def setUpClass(cls): super().setUpClass() cls.url = '/api/groups/' # some user cls.user = User() # two groups with different members cls.member = User() cls.group = Group(members=[ cls.member, ]) cls.member2 = User() cls.group2 = Group(members=[ cls.member2, ])
def setUpClass(cls): super().setUpClass() cls.url = '/api/pickup-dates/' # pickup date for group with one member and one store cls.member = User() cls.group = Group(members=[cls.member, ]) cls.store = Store(group=cls.group) cls.pickup = PickupDate(store=cls.store) cls.pickup_url = cls.url + str(cls.pickup.id) + '/' cls.join_url = cls.pickup_url + 'add/' cls.leave_url = cls.pickup_url + 'remove/' # not a member of the group cls.user = User() # another pickup date for above store cls.pickup_data = {'date': timezone.now() + timedelta(days=2), 'max_collectors': 5, 'store': cls.store.id} # past pickup date cls.past_pickup_data = {'date': timezone.now() - timedelta(days=1), 'max_collectors': 5, 'store': cls.store.id} cls.past_pickup = PickupDate(store=cls.store, date=timezone.now() - timedelta(days=1)) cls.past_pickup_url = cls.url + str(cls.past_pickup.id) + '/' cls.past_join_url = cls.past_pickup_url + 'add/' cls.past_leave_url = cls.past_pickup_url + 'remove/'
def setUpClass(cls): super().setUpClass() cls.url = '/api/users/' cls.user = User() cls.user2 = User() cls.group = Group() cls.group.members.add(cls.user, cls.user2)
def setUpClass(cls): super().setUpClass() cls.user = UserFactory() cls.user2 = UserFactory() cls.verified_user = VerifiedUserFactory() cls.url = '/api/users/' cls.user_data = { 'email': faker.email(), 'password': faker.name(), 'display_name': faker.name(), 'address': faker.address(), 'latitude': faker.latitude(), 'longitude': faker.longitude() } cls.group = Group(members=[cls.user, cls.user2]) cls.another_common_group = Group(members=[cls.user, cls.user2]) cls.user_in_another_group = UserFactory() cls.another_group = Group(members=[ cls.user_in_another_group, ])
def setUpClass(cls): super().setUpClass() cls.url = '/api/stores/' # group with two members and one store cls.member = UserFactory() cls.member2 = UserFactory() cls.group = Group(members=[cls.member, cls.member2]) cls.store = Store(group=cls.group) cls.store_url = cls.url + str(cls.store.id) + '/' # not a member cls.user = UserFactory() # another store for above group cls.store_data = {'name': faker.name(), 'description': faker.name(), 'group': cls.group.id, 'address': faker.address(), 'latitude': faker.latitude(), 'longitude': faker.longitude()} # another group cls.different_group = Group(members=[cls.member2, ])
def setUpClass(cls): super().setUpClass() cls.group = Group() cls.store = Store()
def setUpClass(cls): super().setUpClass() cls.Group = Group()
def setUpClass(cls): super().setUpClass() cls.group = Group(members=[User() for _ in range(3)])