def create_offering_user(self, user): self.client.force_authenticate(user=getattr(self.fixture, user)) offering_url = factories.OfferingFactory.get_url(self.offering) user_url = UserFactory.get_url(self.fixture.user) payload = {'offering': offering_url, 'user': user_url} return self.client.post(reverse('marketplace-offering-user-list'), payload)
def grant_permission(self, user): self.client.force_authenticate(user=getattr(self.fixture, user)) return self.client.post( reverse('marketplace-offering-permission-list'), { 'offering': factories.OfferingFactory.get_url(self.offering), 'user': UserFactory.get_url(self.fixture.user), }, )