def setUp(self): self.factory = RequestFactory() self.auth_token = get_authenticated_user_token() self.token = get_anonymous_user_token() with open('api/test_data/test_data.json') as f: self.test_data = json.load(f) self.user = FirebaseUser(self.test_data["users"]["firebase_data"])
def setUp(self): with open('api/test_data/test_data.json') as f: self.test_data = json.load(f) self.user = FirebaseUser(self.test_data["users"]["firebase_data"]) self.factory = RequestFactory() self.auth_token = get_authenticated_user_token() self.token = get_anonymous_user_token() self.test_uuid = str(uuid.uuid4()) u = Upvote(0, []) u.save(self.test_uuid, db)