def build_jwt_headers(self, user): """ Helper function for creating headers for the JWT authentication. """ token = generate_jwt_header_for_user(user) headers = {'HTTP_AUTHORIZATION': token} return headers
def test_create_with_jwt_authentication(self): """ Verify the endpoint creates a new catalog when the client is authenticated via JWT authentication. """ self.client.logout() self.assert_catalog_created(HTTP_AUTHORIZATION=generate_jwt_header_for_user(self.user))
def test_create_with_jwt_authentication(self): """ Verify the endpoint creates a new catalog when the client is authenticated via JWT authentication. """ self.client.logout() self.assert_catalog_created(HTTP_AUTHORIZATION=generate_jwt_header_for_user(self.user))