Exemplo n.º 1
0
    def test_disconnect_id_nonexistent(self):
        mock = self.mock_for_disconnect()
        self.alter(self.ID_FOR_CONNECTION, {self.XML_KEY: mock})

        response = self.client_autenticado().delete(
            self.URL_REMOVE_CONNECTION % (self.ID_NONEXISTENT, "0"))
        valid_response(response, httplib.INTERNAL_SERVER_ERROR)
        assert_response_error(response, CodeError.INTERFACE_NOT_FOUND)
Exemplo n.º 2
0
 def test_get_persistence_by_env_vip_nonexistent(self):
     response = self.get_persistence_by_env_vip(self.ID_NONEXISTENT)
     valid_response(response, status_code=httplib.INTERNAL_SERVER_ERROR)
     assert_response_error(response, codigo=CodeError.ENV_VIP_NOT_FOUND)
Exemplo n.º 3
0
 def test_get_by_group_out_nonexistent(self):
     response = self.client_autenticado().get(
         self.URL_GET_BY_GROUP_OUT % self.ID_NONEXISTENT)
     valid_response(response, status_code=httplib.INTERNAL_SERVER_ERROR)
     assert_response_error(response, codigo=CodeError.USER_GROUP_NOT_FOUND)
Exemplo n.º 4
0
 def test_list_conns_old_equip_inexistent(self):
     response = self.client_autenticado().get(
         self.URL_LIST_CONNECTIONS_OLD % (self.INTERFACE_FOR_LIST, self.ID_NONEXISTENT))
     valid_response(response, httplib.INTERNAL_SERVER_ERROR)
     assert_response_error(response, CodeError.EQUIPMENT_NOT_FOUND)
Exemplo n.º 5
0
 def test_list_conns_old_interface_minsize(self):
     response = self.client_autenticado().get(
         self.URL_LIST_CONNECTIONS_OLD % (string_generator(2), self.EQUIP_FOR_LIST))
     valid_response(response, httplib.INTERNAL_SERVER_ERROR)
     assert_response_error(response, CodeError.INTERFACE_NOT_FOUND)
Exemplo n.º 6
0
 def test_disconnect_not_connected(self):
     response = self.client_autenticado().delete(
         self.URL_REMOVE_CONNECTION % (self.ID_REMOVE_VALID, "0"))
     valid_response(response, status_code=httplib.INTERNAL_SERVER_ERROR)
     assert_response_error(
         response, codigo=self.CODE_ERROR_IF_NOT_CONNECTED)
Exemplo n.º 7
0
 def test_remove_related(self):
     response = self.remove(self.ID_REMOVE_RELATED)
     valid_response(response, status_code=httplib.INTERNAL_SERVER_ERROR)
     assert_response_error(response, codigo=self.CODE_ERROR_RELATED)