def test_create_chat_for_unauthenticated(self, a_client):
     response = a_client.post('api/v1/chats/',
                              json={
                                  "uid_1": "a",
                                  "uid_2": "a",
                                  "id_order": "a"
                              })
     assert_401(response)
 def test_create_chat_message_for_unauthenticated(self, a_client, a_chat):
     response = a_client.post('api/v1/chats/{}/messages/'.format(
         str(a_chat.id)),
                              json={
                                  "uid_sender": "id",
                                  "message": "a",
                                  "timestamp": 0.0
                              })
     assert_401(response)
Example #3
0
    def test_update_for_unauthenticated(self, a_client, a_customer_user):
        response = a_client.patch('api/v1/users/{}'.format(
            str(a_customer_user.id)))

        assert_401(response)
Example #4
0
 def test_get_me_for_unauthenticated(self, a_client):
     response = a_client.get('api/v1/users/me')
     assert_401(response)
Example #5
0
 def test_get_users_from_customer(self, a_client, a_client_user):
     self.login(a_client, a_client_user.email, a_client_user.password)
     response = self.get_paging(a_client, 'api/v1/users/', 0, 50)
     assert_401(response)
 def test_get_rule_details_fails_for_unauthenticated(
         self, a_client, a_rule):
     response = a_client.get('api/v1/rules/{}'.format(str(a_rule.id)))
     assert_401(response)
Example #7
0
 def test_get_orders_filtered_by_favors_for_unauthenticated(self, a_client):
     response = a_client.get('api/v1/orders/favors')
     assert_401(response)
Example #8
0
 def test_update_for_unauthenticated(self, a_client, an_order):
     response = a_client.patch('api/v1/orders/{}'.format(str(an_order.id)),
                               json={})
     assert_401(response)
    def test_benefits_for_unauthenticated(self, a_client):
        response = a_client.get('api/v1/rules/benefits')

        assert_401(response)
 def test_get_chat_for_not_chat_member(self, a_client, a_client_user,
                                       a_chat):
     response = self.get_chat(a_client, a_chat.id, a_client_user)
     assert_401(response)
 def test_get_operators_for_unauthenticated(self, a_client):
     response = a_client.get('api/v1/rules/operators/')
     assert_401(response)
 def test_get_chat_messages_for_unauthenticated(self, a_client, a_chat):
     response = a_client.get('api/v1/chats/{}/messages/'.format(
         str(a_chat.id)))
     assert_401(response)
 def test_get_chat_for_unauthenticated(self, a_client, a_chat):
     response = a_client.get(
         self.build_url('/chats/{}'.format(str(a_chat.id))))
     assert_401(response)
Example #14
0
    def test_get_directions_for_unauthenticated(self, a_client, an_order):
        response = a_client.get('api/v1/orders/{}/directions'.format(
            str(an_order.id)))

        assert_401(response)
Example #15
0
    def test_orders_placed_for_unauthorized(self, a_client):
        response = a_client.get('api/v1/orders/placed')

        assert_401(response)
Example #16
0
    def test_quote_order_for_unauthenticated(self, a_client, an_order):
        response = a_client.get('api/v1/orders/{}/quotation'.format(
            str(an_order.id)))

        assert_401(response)
 def test_update_field_for_unauthorized(self, a_client, a_rule):
     response = a_client.patch('api/v1/rules/{}'.format(str(a_rule.id)))
     assert_401(response)
 def test_delete_for_unauthenticated(self, a_client, a_rule):
     response = a_client.delete('api/v1/rules/{}'.format(str(a_rule.id)))
     assert_401(response)
 def test_get_variables_for_unauthenticated(self, a_client):
     response = a_client.get('api/v1/rules/variables/')
     assert_401(response)
Example #20
0
 def test_create_for_unauthenticated(self, a_client):
     response = a_client.post('api/v1/orders/', json={})
     assert_401(response)
 def test_get_consequence_types_for_unauthenticated(self, a_client):
     response = a_client.get('api/v1/rules/consequence_types/')
     assert_401(response)
Example #22
0
    def test_create_for_unauthenticated(self, a_client, a_user_rating):
        response = a_client.post('api/v1/user_ratings/',
                                 json=a_user_rating.to_json())

        assert_401(response)
    def test_rule_history_for_unauthenticated(self, a_client, a_rule):
        response = a_client.get('api/v1/rules/{}/history'.format(str(
            a_rule.id)))

        assert_401(response)
    def test_cancelled_orders_for_unauthenticated(self, a_client):
        response = a_client.get('api/v1/statistics/cancelled_orders')

        assert_401(response)
 def test_list_rules_fail_for_unauthenticated(self, a_client):
     response = a_client.get('api/v1/rules/')
     assert_401(response)
    def test_registrations_for_unauthenticated(self, a_client):
        response = a_client.get('api/v1/statistics/registrations')

        assert_401(response)
    def test_create_fails_for_unauthenticated(self, a_client):
        response = a_client.post('api/v1/rules/', )

        assert_401(response)
Example #28
0
 def test_list_orders_for_unauthenticated(self, a_client):
     response = a_client.get(self.build_url('/orders/'))
     assert_401(response)