Пример #1
0
 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
Пример #2
0
 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))
Пример #3
0
 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))