Beispiel #1
0
 def setUpClass(cls):
     super().setUpClass()
     cls.user = User()
     cls.group = GroupFactory()
     cls.url = '/api/groups/'
     cls.group_data = {'name': faker.name(),
                       'description': faker.text(),
                       'address': faker.address(),
                       'latitude': faker.latitude(),
                       'longitude': faker.longitude()}
Beispiel #2
0
 def setUpClass(cls):
     super().setUpClass()
     cls.user = User()
     cls.user2 = User()
     cls.url = '/api/users/'
     cls.user_data = {
         'display_name': faker.name(),
         'first_name': faker.name(),
         'last_name': faker.name(),
         'email': faker.email(),
         'password': 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 = User()
     cls.another_group = Group(members=[cls.user_in_another_group, ])
Beispiel #3
0
    def setUpClass(cls):
        super().setUpClass()
        cls.url = '/api/stores/'

        # group with two members and one store
        cls.member = User()
        cls.member2 = User()
        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 = User()

        # 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, ])