Commit 03e2456c authored by Håvard Farestveit's avatar Håvard Farestveit
Browse files

Removed wildcard import and cleaned code

cleaned code
parent d684d27c
Pipeline #125974 passed with stage
in 35 seconds
from users.tests.offers import *
from users.tests.offers import OfferTestCase
from users.tests.user_registration import UserRegistration2WayTestCase
from users.tests.user_serializer import UserSerializerTestCase
......@@ -33,16 +33,12 @@ class OfferTestCase(TestCase):
def _send_offer(self, user_id, status):
request = {}
request["status"] = status
request["recipient"] = "{0}/".format(user_id)
request = {"status": status, "recipient": "{0}/".format(user_id)}
response ='/api/offers/', request)
return response.status_code
def _login(self, user):
request = {}
request["username"] = user.username
request["password"] = self.password
request = {"username": user.username, "password": self.password}
response ='/api/token/', request)
access_token =['access']
self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + access_token)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment