Esempio n. 1
0
 def test_range_view_get_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP GET request on the '/v2/range_view/' route.
     """
     test_route_auth(
         self, self.client, 'GET', '/v2/range_view/users/andy/r/2016-12-01/2016-12-31', AuthVariant.UNAUTHORIZED
     )
 def test_log_feed_get_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP GET request on the '/v2/log_feed/' route.
     """
     test_route_auth(self, self.client, 'GET',
                     '/v2/log_feed/username/andy/25/100',
                     AuthVariant.FORBIDDEN)
 def test_log_feed_get_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP GET request on the '/v2/log_feed/' route.
     """
     test_route_auth(self, self.client, 'GET',
                     '/v2/log_feed/username/andy/25/100',
                     AuthVariant.UNAUTHORIZED)
Esempio n. 4
0
 def test_team_groups_by_team_name_get_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP GET request on the '/v2/teams/groups/<team_name>' route.
     """
     test_route_auth(self, self.client, 'GET',
                     '/v2/teams/groups/saintsxctf',
                     AuthVariant.UNAUTHORIZED)
Esempio n. 5
0
 def test_range_view_get_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP GET request on the '/v2/range_view/' route.
     """
     test_route_auth(
         self, self.client, 'GET', '/v2/range_view/users/andy/r/2016-12-01/2016-12-31', AuthVariant.FORBIDDEN
     )
 def test_comment_get_route_redirect_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP GET request on the '/v2/comments' route.
     """
     test_route_auth(self, self.client, 'GET', '/v2/comments',
                     AuthVariant.UNAUTHORIZED)
 def test_comment_get_route_redirect_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP GET request on the '/v2/comments' route.
     """
     test_route_auth(self, self.client, 'GET', '/v2/comments',
                     AuthVariant.FORBIDDEN)
Esempio n. 8
0
 def test_forgot_password_post_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP POST request on the '/v2/forgot_password/<username>' route.
     """
     test_route_auth(self, self.client, 'POST', '/v2/forgot_password/andy', AuthVariant.UNAUTHORIZED)
 def test_flair_post_route_redirect_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP POST request on the '/v2/flair' route.
     """
     test_route_auth(self, self.client, 'POST', '/v2/flair', AuthVariant.FORBIDDEN)
 def test_comment_with_id_soft_delete_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP DELETE request on the '/v2/comments/soft/<comment_id>' route.
     """
     test_route_auth(self, self.client, 'DELETE', '/v2/comments/soft/1',
                     AuthVariant.FORBIDDEN)
 def test_message_by_id_soft_delete_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP DELETE request on the '/v2/messages/soft/<message_id>' route.
     """
     test_route_auth(self, self.client, 'DELETE', '/v2/messages/soft/2', AuthVariant.FORBIDDEN)
 def test_message_by_id_put_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP PUT request on the '/v2/messages/<message_id>' route.
     """
     test_route_auth(self, self.client, 'PUT', '/v2/messages/2', AuthVariant.UNAUTHORIZED)
 def test_message_by_id_put_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP PUT request on the '/v2/messages/<message_id>' route.
     """
     test_route_auth(self, self.client, 'PUT', '/v2/messages/2', AuthVariant.FORBIDDEN)
 def test_notification_by_id_soft_delete_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP DELETE request on the '/v2/notifications/soft/<notification_id>' route.
     """
     test_route_auth(self, self.client, 'DELETE', '/v2/notifications/soft/1', AuthVariant.UNAUTHORIZED)
 def test_notification_by_id_soft_delete_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP DELETE request on the '/v2/notifications/soft/<notification_id>' route.
     """
     test_route_auth(self, self.client, 'DELETE', '/v2/notifications/soft/1', AuthVariant.FORBIDDEN)
 def test_notification_by_id_put_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP PUT request on the '/v2/notifications/<notification_id>' route.
     """
     test_route_auth(self, self.client, 'PUT', '/v2/notifications/1', AuthVariant.UNAUTHORIZED)
 def test_notification_by_id_put_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP PUT request on the '/v2/notifications/<notification_id>' route.
     """
     test_route_auth(self, self.client, 'PUT', '/v2/notifications/1', AuthVariant.FORBIDDEN)
 def test_comment_with_id_put_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP PUT request on the '/v2/comments/<comment_id>' route.
     """
     test_route_auth(self, self.client, 'PUT', '/v2/comments/1',
                     AuthVariant.FORBIDDEN)
 def test_comment_with_id_put_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP PUT request on the '/v2/comments/<comment_id>' route.
     """
     test_route_auth(self, self.client, 'PUT', '/v2/comments/1',
                     AuthVariant.UNAUTHORIZED)
 def test_message_by_id_soft_delete_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP DELETE request on the '/v2/messages/soft/<message_id>' route.
     """
     test_route_auth(self, self.client, 'DELETE', '/v2/messages/soft/2', AuthVariant.UNAUTHORIZED)
 def test_comment_with_id_soft_delete_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP DELETE request on the '/v2/comments/soft/<comment_id>' route.
     """
     test_route_auth(self, self.client, 'DELETE', '/v2/comments/soft/1',
                     AuthVariant.UNAUTHORIZED)
Esempio n. 22
0
 def test_search_teams_by_text_get_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP GET request on the '/v2/teams/search/<text>/<limit>' route.
     """
     test_route_auth(self, self.client, 'GET', '/v2/teams/search/St/5',
                     AuthVariant.UNAUTHORIZED)
Esempio n. 23
0
 def test_flair_post_route_redirect_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP POST request on the '/v2/flair' route.
     """
     test_route_auth(self, self.client, 'POST', '/v2/flair', AuthVariant.UNAUTHORIZED)
Esempio n. 24
0
 def test_team_get_all_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP GET request on the '/v2/teams/' route.
     """
     test_route_auth(self, self.client, 'GET', '/v2/teams/',
                     AuthVariant.UNAUTHORIZED)
Esempio n. 25
0
 def test_search_teams_by_text_get_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP GET request on the '/v2/teams/search/<text>/<limit>' route.
     """
     test_route_auth(self, self.client, 'GET', '/v2/teams/search/St/5',
                     AuthVariant.FORBIDDEN)
Esempio n. 26
0
 def test_forgot_password_post_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP POST request on the '/v2/forgot_password/<username>' route.
     """
     test_route_auth(self, self.client, 'POST', '/v2/forgot_password/andy', AuthVariant.FORBIDDEN)
Esempio n. 27
0
 def test_team_get_all_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP GET request on the '/v2/teams/' route.
     """
     test_route_auth(self, self.client, 'GET', '/v2/teams/',
                     AuthVariant.FORBIDDEN)
 def test_comment_post_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP POST request on the '/v2/comments/' route.
     """
     test_route_auth(self, self.client, 'POST', '/v2/comments/',
                     AuthVariant.FORBIDDEN)
Esempio n. 29
0
 def test_team_by_name_get_route_forbidden(self) -> None:
     """
     Test performing a forbidden HTTP GET request on the '/v2/teams/<name>' route.
     """
     test_route_auth(self, self.client, 'GET', '/v2/teams/saintsxctf',
                     AuthVariant.FORBIDDEN)
 def test_comment_post_route_unauthorized(self) -> None:
     """
     Test performing an unauthorized HTTP POST request on the '/v2/comments/' route.
     """
     test_route_auth(self, self.client, 'POST', '/v2/comments/',
                     AuthVariant.UNAUTHORIZED)