otrs-somconnexio 0.4.4__py2.py3-none-any.whl → 0.7.3__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- otrs_somconnexio/client.py +110 -42
- otrs_somconnexio/exceptions.py +44 -11
- otrs_somconnexio/otrs_models/abstract_article.py +3 -0
- otrs_somconnexio/otrs_models/adsl_data.py +7 -37
- otrs_somconnexio/otrs_models/adsl_dynamic_fields.py +5 -4
- otrs_somconnexio/otrs_models/adsl_ticket.py +9 -5
- otrs_somconnexio/otrs_models/configurations/changes/__init__.py +0 -0
- otrs_somconnexio/otrs_models/configurations/changes/add_data.py +13 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_email.py +16 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_iban.py +8 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_owner.py +19 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_pack.py +6 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_shared_bond.py +7 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_tariff.py +29 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_tariff_adsl.py +20 -0
- otrs_somconnexio/otrs_models/configurations/changes/change_tariff_fiber.py +11 -0
- otrs_somconnexio/otrs_models/configurations/provision/__init__.py +0 -0
- otrs_somconnexio/otrs_models/configurations/{adsl_ticket.py → provision/adsl_ticket.py} +2 -2
- otrs_somconnexio/otrs_models/configurations/{fiber_ticket.py → provision/fiber_ticket.py} +6 -3
- otrs_somconnexio/otrs_models/configurations/provision/mobile_ticket.py +44 -0
- otrs_somconnexio/otrs_models/configurations/provision/router_4G_ticket.py +8 -0
- otrs_somconnexio/otrs_models/configurations/provision/switchboard_ticket.py +10 -0
- otrs_somconnexio/otrs_models/configurations/querys/__init__.py +0 -0
- otrs_somconnexio/otrs_models/configurations/querys/check_coverage.py +16 -0
- otrs_somconnexio/otrs_models/configurations/querys/we_call_you.py +26 -0
- otrs_somconnexio/otrs_models/coverage/adsl.py +1 -1
- otrs_somconnexio/otrs_models/coverage/asociatel_fiber.py +6 -0
- otrs_somconnexio/otrs_models/coverage/mm_fiber.py +7 -0
- otrs_somconnexio/otrs_models/coverage/orange_fiber.py +5 -0
- otrs_somconnexio/otrs_models/coverage/vdf_fiber.py +8 -0
- otrs_somconnexio/otrs_models/coverage_article.py +20 -4
- otrs_somconnexio/otrs_models/coverage_ticket.py +1 -0
- otrs_somconnexio/otrs_models/customer_data.py +15 -3
- otrs_somconnexio/otrs_models/customer_user.py +3 -9
- otrs_somconnexio/otrs_models/fiber_data.py +17 -33
- otrs_somconnexio/otrs_models/fiber_dynamic_fields.py +58 -4
- otrs_somconnexio/otrs_models/fiber_ticket.py +9 -5
- otrs_somconnexio/otrs_models/internet_data.py +79 -0
- otrs_somconnexio/otrs_models/internet_dynamic_fields.py +65 -26
- otrs_somconnexio/otrs_models/mobile_data.py +49 -5
- otrs_somconnexio/otrs_models/mobile_dynamic_fields.py +50 -8
- otrs_somconnexio/otrs_models/mobile_ticket.py +20 -4
- otrs_somconnexio/otrs_models/process_ticket/internet.py +40 -97
- otrs_somconnexio/otrs_models/process_ticket/mobile.py +63 -43
- otrs_somconnexio/otrs_models/process_ticket/process_ticket.py +74 -0
- otrs_somconnexio/otrs_models/providers.py +4 -3
- otrs_somconnexio/otrs_models/provision_article.py +7 -5
- otrs_somconnexio/otrs_models/provision_dynamic_fields.py +76 -11
- otrs_somconnexio/otrs_models/provision_ticket.py +52 -28
- otrs_somconnexio/otrs_models/responsible_data.py +6 -0
- otrs_somconnexio/otrs_models/router_4G_data.py +8 -0
- otrs_somconnexio/otrs_models/router_4G_dynamic_fields.py +9 -0
- otrs_somconnexio/otrs_models/router_4G_ticket.py +26 -0
- otrs_somconnexio/otrs_models/service.py +41 -12
- otrs_somconnexio/otrs_models/switchboard_data.py +58 -0
- otrs_somconnexio/otrs_models/switchboard_dynamic_fields.py +94 -0
- otrs_somconnexio/otrs_models/switchboard_header_data.py +18 -0
- otrs_somconnexio/otrs_models/switchboard_header_dynamic_fields.py +80 -0
- otrs_somconnexio/otrs_models/switchboard_header_ticket.py +30 -0
- otrs_somconnexio/otrs_models/switchboard_ticket.py +35 -0
- otrs_somconnexio/otrs_models/telecom_company.py +69 -69
- otrs_somconnexio/otrs_models/ticket_factory.py +34 -11
- otrs_somconnexio/otrs_models/ticket_types/__init__.py +0 -0
- otrs_somconnexio/otrs_models/ticket_types/add_data_ticket.py +36 -0
- otrs_somconnexio/otrs_models/ticket_types/base_change_tariff_ba_ticket.py +23 -0
- otrs_somconnexio/otrs_models/ticket_types/base_change_ticket.py +33 -0
- otrs_somconnexio/otrs_models/ticket_types/base_customer_ticket.py +24 -0
- otrs_somconnexio/otrs_models/ticket_types/base_ticket.py +147 -0
- otrs_somconnexio/otrs_models/ticket_types/change_email_ticket.py +40 -0
- otrs_somconnexio/otrs_models/ticket_types/change_iban_ticket.py +39 -0
- otrs_somconnexio/otrs_models/ticket_types/change_owner_ticket.py +132 -0
- otrs_somconnexio/otrs_models/ticket_types/change_pack_not_shared_data.py +36 -0
- otrs_somconnexio/otrs_models/ticket_types/change_personal_email_ticket.py +31 -0
- otrs_somconnexio/otrs_models/ticket_types/change_shared_bond_ticket.py +35 -0
- otrs_somconnexio/otrs_models/ticket_types/change_tariff_adsl_landline_ticket.py +30 -0
- otrs_somconnexio/otrs_models/ticket_types/change_tariff_adsl_out_landline_ticket.py +30 -0
- otrs_somconnexio/otrs_models/ticket_types/change_tariff_adsl_ticket.py +42 -0
- otrs_somconnexio/otrs_models/ticket_types/change_tariff_fiber_ticket.py +43 -0
- otrs_somconnexio/otrs_models/ticket_types/change_tariff_ticket.py +87 -0
- otrs_somconnexio/otrs_models/ticket_types/change_tariff_ticket_mobile_pack.py +51 -0
- otrs_somconnexio/otrs_models/ticket_types/change_tariff_ticket_shared_bonds.py +22 -0
- otrs_somconnexio/otrs_models/ticket_types/check_coverage_ticket.py +52 -0
- otrs_somconnexio/otrs_models/ticket_types/we_call_you_ticket.py +53 -0
- otrs_somconnexio/otrs_models/vf_provisioning_article.py +4 -2
- otrs_somconnexio/responses/ticket_creation.py +5 -4
- otrs_somconnexio/services/activate_change_tarriff_mobile_tickets.py +13 -0
- otrs_somconnexio/services/base_get_ticket_by_number.py +22 -0
- otrs_somconnexio/services/change_to_confirm_ticket.py +45 -0
- otrs_somconnexio/services/get_mobile_related_tickets.py +11 -0
- otrs_somconnexio/services/get_sharing_data_mobile_tickets.py +65 -0
- otrs_somconnexio/services/get_ticket_title.py +26 -0
- otrs_somconnexio/services/mapping_mobile_minutes.py +5 -5
- otrs_somconnexio/services/mapping_services.py +8 -6
- otrs_somconnexio/services/move_sharing_data_mobile_tickets.py +13 -0
- otrs_somconnexio/services/search_tickets_mobile_change_tariff.py +25 -0
- otrs_somconnexio/services/search_tickets_service.py +57 -0
- otrs_somconnexio/services/set_SIM_recieved_mobile_ticket.py +107 -0
- otrs_somconnexio/services/set_SIM_returned_mobile_ticket.py +37 -0
- otrs_somconnexio/services/set_fiber_contract_code_mobile_ticket.py +21 -0
- otrs_somconnexio/services/unblock_mobile_pack_ticket.py +48 -0
- otrs_somconnexio/services/update_process_ticket_with_coverage_tickets_info_service.py +10 -10
- otrs_somconnexio/services/update_ticket_DF.py +18 -0
- otrs_somconnexio/services/update_ticket_with_provider_info.py +2 -3
- otrs_somconnexio/user_management_client/client.py +15 -27
- otrs_somconnexio/user_management_client/user_management_response.py +2 -3
- {otrs_somconnexio-0.4.4.dist-info → otrs_somconnexio-0.7.3.dist-info}/METADATA +19 -4
- otrs_somconnexio-0.7.3.dist-info/RECORD +202 -0
- {otrs_somconnexio-0.4.4.dist-info → otrs_somconnexio-0.7.3.dist-info}/WHEEL +1 -1
- tests/data/otrs_raw_responses.py +12 -6
- tests/integration/test_change_customer_language.py +14 -19
- tests/integration/test_ticket_factory.py +383 -106
- tests/integration/test_update_ticket_with_coverage_data.py +53 -27
- tests/otrs_models/common_helper.py +9 -0
- tests/otrs_models/configuration/changes/__init__.py +0 -0
- tests/otrs_models/configuration/changes/test_change_tariff_ticket.py +91 -0
- tests/otrs_models/configuration/provision/__init__.py +0 -0
- tests/otrs_models/configuration/provision/test_adsl_ticket.py +30 -0
- tests/otrs_models/configuration/provision/test_fiber_ticket.py +32 -0
- tests/otrs_models/configuration/provision/test_mobile_ticket.py +62 -0
- tests/otrs_models/process_ticket/test_internet_process_ticket.py +54 -60
- tests/otrs_models/process_ticket/test_mobile_process_ticket.py +56 -33
- tests/otrs_models/test_abstract_article.py +3 -2
- tests/otrs_models/test_adsl_data.py +11 -4
- tests/otrs_models/test_adsl_dynamic_fields.py +217 -100
- tests/otrs_models/test_adsl_ticket.py +78 -83
- tests/otrs_models/test_coverage_article.py +9 -7
- tests/otrs_models/test_coverage_ticket.py +4 -2
- tests/otrs_models/test_customer_user.py +23 -20
- tests/otrs_models/test_fiber_data.py +20 -4
- tests/otrs_models/test_fiber_dynamic_fields.py +458 -134
- tests/otrs_models/test_fiber_ticket.py +113 -79
- tests/otrs_models/test_mobile_data.py +14 -3
- tests/otrs_models/test_mobile_dynamic_fields.py +335 -74
- tests/otrs_models/test_mobile_paused_ticket.py +35 -0
- tests/otrs_models/test_mobile_ticket.py +82 -96
- tests/otrs_models/test_provision_article.py +49 -0
- tests/otrs_models/test_router_4G_data.py +43 -0
- tests/otrs_models/test_router_4G_dynamic_fields.py +619 -0
- tests/otrs_models/test_router_4G_ticket.py +135 -0
- tests/otrs_models/test_service.py +58 -14
- tests/otrs_models/test_switchboard_data.py +37 -0
- tests/otrs_models/test_switchboard_dynamic_fields.py +197 -0
- tests/otrs_models/test_switchboard_header_data.py +18 -0
- tests/otrs_models/test_switchboard_header_dynamic_fields.py +119 -0
- tests/otrs_models/test_switchboard_header_ticket.py +127 -0
- tests/otrs_models/test_switchboard_ticket.py +147 -0
- tests/otrs_models/test_telecom_company.py +16 -16
- tests/otrs_models/test_ticket_factory.py +73 -16
- tests/otrs_models/test_vf_provisioning_article.py +6 -5
- tests/otrs_models/ticket_types/__init__.py +0 -0
- tests/otrs_models/ticket_types/test_add_data.py +79 -0
- tests/otrs_models/ticket_types/test_change_email.py +163 -0
- tests/otrs_models/ticket_types/test_change_iban.py +82 -0
- tests/otrs_models/ticket_types/test_change_owner.py +277 -0
- tests/otrs_models/ticket_types/test_change_pack_not_shared_data.py +77 -0
- tests/otrs_models/ticket_types/test_change_personal_email.py +81 -0
- tests/otrs_models/ticket_types/test_change_tariff.py +435 -0
- tests/otrs_models/ticket_types/test_change_tariff_adsl_landline.py +115 -0
- tests/otrs_models/ticket_types/test_change_tariff_adsl_out_landline.py +115 -0
- tests/otrs_models/ticket_types/test_change_tariff_fiber.py +175 -0
- tests/otrs_models/ticket_types/test_change_tariff_mobile_pack.py +151 -0
- tests/otrs_models/ticket_types/test_change_tariff_shared_bonds.py +65 -0
- tests/otrs_models/ticket_types/test_check_coverage.py +106 -0
- tests/otrs_models/ticket_types/test_shared_bond.py +80 -0
- tests/otrs_models/ticket_types/test_we_call_you.py +108 -0
- tests/responses/test_ticket_creation.py +4 -4
- tests/services/test_activate_change_tariff_mobile_tickets.py +45 -0
- tests/services/test_change_to_confirm_ticket.py +80 -0
- tests/services/test_get_mobile_related_tickets.py +39 -0
- tests/services/test_get_sharing_data_mobile_tickets.py +127 -0
- tests/services/test_mapping_mobile_minutes.py +8 -8
- tests/services/{test_mappint_services.py → test_mapping_services.py} +9 -9
- tests/services/test_move_sharing_data_mobile_tickets.py +43 -0
- tests/services/test_search_tickets_mobile_change_tariff.py +84 -0
- tests/services/test_search_tickets_service.py +166 -0
- tests/services/test_set_SIM_recieved_mobile_ticket_service.py +211 -0
- tests/services/test_set_SIM_returned_mobile_ticket_service.py +59 -0
- tests/services/test_set_fiber_contract_code_mobile_ticket_service.py +47 -0
- tests/services/test_unblock_mobile_pack_ticket.py +224 -0
- tests/services/test_update_process_ticket_with_VF_provisioning.py +15 -14
- tests/services/test_update_process_ticket_with_coverage_tickets_info_service.py +22 -10
- tests/services/test_update_ticket_with_provider_info.py +16 -15
- tests/user_management_client/test_client.py +41 -58
- tests/user_management_client/test_user_management_response.py +13 -26
- otrs_somconnexio/otrs_models/configurations/mobile_ticket.py +0 -17
- otrs_somconnexio/otrs_models/coverage/mm_fibre.py +0 -7
- otrs_somconnexio/otrs_models/coverage/vdf_fibre.py +0 -8
- otrs_somconnexio-0.4.4.dist-info/RECORD +0 -95
- tests/otrs_models/configuration/test_adsl_ticket.py +0 -45
- tests/otrs_models/configuration/test_fiber_ticket.py +0 -45
- tests/otrs_models/configuration/test_mobile_ticket.py +0 -45
- {otrs_somconnexio-0.4.4.dist-info → otrs_somconnexio-0.7.3.dist-info}/top_level.txt +0 -0
|
@@ -3,8 +3,10 @@ from mock import Mock, patch
|
|
|
3
3
|
|
|
4
4
|
from pyotrs.lib import DynamicField
|
|
5
5
|
from otrs_somconnexio.client import OTRSClient
|
|
6
|
-
from otrs_somconnexio.services.update_ticket_with_provider_info import
|
|
7
|
-
UpdateTicketWithProviderInfo
|
|
6
|
+
from otrs_somconnexio.services.update_ticket_with_provider_info import (
|
|
7
|
+
UpdateTicketWithProviderInfo,
|
|
8
|
+
)
|
|
9
|
+
|
|
8
10
|
|
|
9
11
|
class FakeUpdateTicketService(UpdateTicketWithProviderInfo):
|
|
10
12
|
"""
|
|
@@ -17,22 +19,23 @@ class FakeUpdateTicketService(UpdateTicketWithProviderInfo):
|
|
|
17
19
|
self.article = article
|
|
18
20
|
self.df_dct = df_dct
|
|
19
21
|
|
|
20
|
-
class UpdateTicketWithProviderInfoTestCase(unittest.TestCase):
|
|
21
22
|
|
|
23
|
+
class UpdateTicketWithProviderInfoTestCase(unittest.TestCase):
|
|
22
24
|
def setUp(self):
|
|
23
|
-
self.ticket_id =
|
|
24
|
-
self.test_name =
|
|
25
|
-
self.test_value =
|
|
25
|
+
self.ticket_id = "00001"
|
|
26
|
+
self.test_name = "test_name"
|
|
27
|
+
self.test_value = "test_value"
|
|
26
28
|
self.expected_df = DynamicField(name=self.test_name, value=self.test_value)
|
|
27
29
|
self.pyOTRS_article = object()
|
|
28
|
-
self.article = Mock(spec=[
|
|
30
|
+
self.article = Mock(spec=["call"])
|
|
29
31
|
self.df_dct = {self.test_name: self.test_value}
|
|
30
32
|
|
|
31
|
-
@patch(
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
@patch(
|
|
34
|
+
"otrs_somconnexio.services.update_ticket_with_provider_info.OTRSClient",
|
|
35
|
+
return_value=Mock(spec=["update_ticket"]),
|
|
36
|
+
)
|
|
37
|
+
@patch("otrs_somconnexio.services.update_ticket_with_provider_info.DynamicField")
|
|
34
38
|
def test_run(self, MockDF, MockOTRSClient):
|
|
35
|
-
|
|
36
39
|
def mock_df_side_effect(name, value):
|
|
37
40
|
if name == self.test_name and value == self.test_value:
|
|
38
41
|
return self.expected_df
|
|
@@ -43,7 +46,5 @@ class UpdateTicketWithProviderInfoTestCase(unittest.TestCase):
|
|
|
43
46
|
FakeUpdateTicketService(self.ticket_id, self.article, self.df_dct).run()
|
|
44
47
|
|
|
45
48
|
MockOTRSClient.return_value.update_ticket.assert_called_once_with(
|
|
46
|
-
self.ticket_id,
|
|
47
|
-
|
|
48
|
-
dynamic_fields=[self.expected_df]
|
|
49
|
-
)
|
|
49
|
+
self.ticket_id, self.pyOTRS_article, dynamic_fields=[self.expected_df]
|
|
50
|
+
)
|
|
@@ -7,132 +7,115 @@ from mock import Mock, patch
|
|
|
7
7
|
from otrs_somconnexio.exceptions import UserManagementResponseEmpty
|
|
8
8
|
from otrs_somconnexio.user_management_client.client import UserManagementClient
|
|
9
9
|
|
|
10
|
-
USER =
|
|
11
|
-
PASSW =
|
|
12
|
-
URL =
|
|
10
|
+
USER = "user"
|
|
11
|
+
PASSW = "passw"
|
|
12
|
+
URL = "https://otrs-url.coop/"
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@patch.dict(os.environ, {
|
|
16
|
-
'OTRS_USER': USER,
|
|
17
|
-
'OTRS_PASSW': PASSW,
|
|
18
|
-
'OTRS_URL': URL
|
|
19
|
-
})
|
|
15
|
+
@patch.dict(os.environ, {"OTRS_USER": USER, "OTRS_PASSW": PASSW, "OTRS_URL": URL})
|
|
20
16
|
class UserManagementClientTestCase(unittest.TestCase):
|
|
21
|
-
|
|
22
17
|
def setUp(self):
|
|
23
|
-
self.user_id =
|
|
24
|
-
self.expected_url =
|
|
18
|
+
self.user_id = "test@test.test"
|
|
19
|
+
self.expected_url = (
|
|
20
|
+
"{}otrs/nph-genericinterface.pl/Webservice/UserManagement/cuser".format(URL)
|
|
21
|
+
)
|
|
25
22
|
|
|
26
23
|
self.expected_body = {
|
|
27
24
|
"UserLogin": USER,
|
|
28
25
|
"Password": PASSW,
|
|
29
|
-
"Object": "Kernel::System::CustomerUser"
|
|
26
|
+
"Object": "Kernel::System::CustomerUser",
|
|
30
27
|
}
|
|
31
28
|
|
|
32
|
-
@patch(
|
|
29
|
+
@patch("otrs_somconnexio.user_management_client.client.requests", spec=["post"])
|
|
33
30
|
def test_set_user_preference(self, requests_mock):
|
|
34
|
-
lang =
|
|
35
|
-
preference_key =
|
|
31
|
+
lang = "es"
|
|
32
|
+
preference_key = "UserLanguage"
|
|
36
33
|
|
|
37
34
|
self.expected_body["Method"] = "SetPreferences"
|
|
38
35
|
self.expected_body["Parameter"] = {
|
|
39
36
|
"Key": preference_key,
|
|
40
37
|
"Value": lang,
|
|
41
|
-
"UserID": self.user_id
|
|
38
|
+
"UserID": self.user_id,
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
requests_mock.post.return_value = Mock(spec=[
|
|
41
|
+
requests_mock.post.return_value = Mock(spec=["json"])
|
|
45
42
|
requests_mock.post.return_value.json.return_value = {"Result": [1]}
|
|
46
43
|
|
|
47
44
|
UserManagementClient(self.user_id).set_preference(preference_key, lang)
|
|
48
45
|
|
|
49
46
|
requests_mock.post.assert_called_once_with(
|
|
50
|
-
self.expected_url, data=json.dumps(self.expected_body)
|
|
47
|
+
self.expected_url, data=json.dumps(self.expected_body)
|
|
48
|
+
)
|
|
51
49
|
|
|
52
|
-
@patch(
|
|
50
|
+
@patch("otrs_somconnexio.user_management_client.client.requests", spec=["post"])
|
|
53
51
|
def test_set_user_preference_raise_error_if_fails(self, requests_mock):
|
|
54
|
-
lang =
|
|
55
|
-
preference_key =
|
|
52
|
+
lang = "es"
|
|
53
|
+
preference_key = "UserLanguage"
|
|
56
54
|
|
|
57
|
-
requests_mock.post.return_value = Mock(spec=[
|
|
55
|
+
requests_mock.post.return_value = Mock(spec=["json"])
|
|
58
56
|
requests_mock.post.return_value.json.return_value = {"Result": []}
|
|
59
57
|
|
|
60
58
|
self.assertRaises(
|
|
61
59
|
UserManagementResponseEmpty,
|
|
62
60
|
UserManagementClient(self.user_id).set_preference,
|
|
63
61
|
preference_key,
|
|
64
|
-
lang
|
|
62
|
+
lang,
|
|
65
63
|
)
|
|
66
64
|
|
|
67
|
-
@patch(
|
|
65
|
+
@patch("otrs_somconnexio.user_management_client.client.requests", spec=["post"])
|
|
68
66
|
def test_get_user_preferences(self, requests_mock):
|
|
69
67
|
|
|
70
68
|
self.expected_body["Method"] = "GetPreferences"
|
|
71
|
-
self.expected_body["Parameter"] = {
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
expected_response = {
|
|
75
|
-
"Result": ['key1', 'value1', 'key2', 'value2']
|
|
76
|
-
}
|
|
77
|
-
expected_result = {
|
|
78
|
-
'key1': 'value1',
|
|
79
|
-
'key2': 'value2'
|
|
80
|
-
}
|
|
69
|
+
self.expected_body["Parameter"] = {"UserID": self.user_id}
|
|
70
|
+
expected_response = {"Result": ["key1", "value1", "key2", "value2"]}
|
|
71
|
+
expected_result = {"key1": "value1", "key2": "value2"}
|
|
81
72
|
|
|
82
|
-
requests_mock.post.return_value = Mock(spec=[
|
|
73
|
+
requests_mock.post.return_value = Mock(spec=["json"])
|
|
83
74
|
requests_mock.post.return_value.json.return_value = expected_response
|
|
84
75
|
|
|
85
76
|
result = UserManagementClient(self.user_id).get_preferences()
|
|
86
77
|
|
|
87
78
|
requests_mock.post.assert_called_once_with(
|
|
88
|
-
self.expected_url, data=json.dumps(self.expected_body)
|
|
79
|
+
self.expected_url, data=json.dumps(self.expected_body)
|
|
80
|
+
)
|
|
89
81
|
|
|
90
82
|
self.assertEqual(result, expected_result)
|
|
91
83
|
|
|
92
|
-
@patch(
|
|
84
|
+
@patch("otrs_somconnexio.user_management_client.client.requests", spec=["post"])
|
|
93
85
|
def test_get_empty_user_preferences(self, requests_mock):
|
|
94
86
|
|
|
95
87
|
self.expected_body["Method"] = "GetPreferences"
|
|
96
|
-
self.expected_body["Parameter"] = {
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
expected_response = {
|
|
100
|
-
"Result": []
|
|
101
|
-
}
|
|
88
|
+
self.expected_body["Parameter"] = {"UserID": self.user_id}
|
|
89
|
+
expected_response = {"Result": []}
|
|
102
90
|
expected_result = {}
|
|
103
91
|
|
|
104
|
-
requests_mock.post.return_value = Mock(spec=[
|
|
92
|
+
requests_mock.post.return_value = Mock(spec=["json"])
|
|
105
93
|
requests_mock.post.return_value.json.return_value = expected_response
|
|
106
94
|
|
|
107
95
|
result = UserManagementClient(self.user_id).get_preferences()
|
|
108
96
|
|
|
109
97
|
requests_mock.post.assert_called_once_with(
|
|
110
|
-
self.expected_url, data=json.dumps(self.expected_body)
|
|
98
|
+
self.expected_url, data=json.dumps(self.expected_body)
|
|
99
|
+
)
|
|
111
100
|
|
|
112
101
|
self.assertEqual(result, expected_result)
|
|
113
102
|
|
|
114
|
-
@patch(
|
|
103
|
+
@patch("otrs_somconnexio.user_management_client.client.requests", spec=["post"])
|
|
115
104
|
def test_get_data(self, requests_mock):
|
|
116
105
|
|
|
117
106
|
self.expected_body["Method"] = "CustomerUserDataGet"
|
|
118
|
-
self.expected_body["Parameter"] = {
|
|
119
|
-
"User": self.user_id
|
|
120
|
-
}
|
|
107
|
+
self.expected_body["Parameter"] = {"User": self.user_id}
|
|
121
108
|
|
|
122
|
-
expected_response = {
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
expected_result = {
|
|
126
|
-
'key1': 'value1',
|
|
127
|
-
'key2': 'value2'
|
|
128
|
-
}
|
|
109
|
+
expected_response = {"Result": ["key1", "value1", "key2", "value2"]}
|
|
110
|
+
expected_result = {"key1": "value1", "key2": "value2"}
|
|
129
111
|
|
|
130
|
-
requests_mock.post.return_value = Mock(spec=[
|
|
112
|
+
requests_mock.post.return_value = Mock(spec=["json"])
|
|
131
113
|
requests_mock.post.return_value.json.return_value = expected_response
|
|
132
114
|
|
|
133
115
|
result = UserManagementClient(self.user_id).get_data()
|
|
134
116
|
|
|
135
117
|
requests_mock.post.assert_called_once_with(
|
|
136
|
-
self.expected_url, data=json.dumps(self.expected_body)
|
|
118
|
+
self.expected_url, data=json.dumps(self.expected_body)
|
|
119
|
+
)
|
|
137
120
|
|
|
138
121
|
self.assertEqual(result, expected_result)
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import unittest
|
|
2
|
-
from otrs_somconnexio.user_management_client.user_management_response import
|
|
2
|
+
from otrs_somconnexio.user_management_client.user_management_response import (
|
|
3
|
+
UserManagementResponse,
|
|
4
|
+
)
|
|
3
5
|
from otrs_somconnexio.exceptions import UserManagementResponseEmpty
|
|
4
6
|
|
|
5
7
|
|
|
6
|
-
class FakeResponse
|
|
8
|
+
class FakeResponse:
|
|
7
9
|
def __init__(self, value):
|
|
8
|
-
self.content = {
|
|
9
|
-
'Result': value
|
|
10
|
-
}
|
|
10
|
+
self.content = {"Result": value}
|
|
11
11
|
|
|
12
12
|
def json(self):
|
|
13
13
|
return self.content
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class UserManagementResponseTestCase(unittest.TestCase):
|
|
17
|
-
|
|
18
17
|
def test_response_setting_call_ok(self):
|
|
19
18
|
raw_response = FakeResponse([1])
|
|
20
19
|
|
|
21
|
-
response = UserManagementResponse(
|
|
22
|
-
raw_response,
|
|
23
|
-
1,
|
|
24
|
-
"Testing OK response"
|
|
25
|
-
)
|
|
20
|
+
response = UserManagementResponse(raw_response, 1, "Testing OK response")
|
|
26
21
|
|
|
27
22
|
self.assertEqual(response.raw_data, [1])
|
|
28
23
|
|
|
@@ -34,31 +29,23 @@ class UserManagementResponseTestCase(unittest.TestCase):
|
|
|
34
29
|
UserManagementResponse,
|
|
35
30
|
raw_response,
|
|
36
31
|
1,
|
|
37
|
-
"Testing KO response"
|
|
32
|
+
"Testing KO response",
|
|
38
33
|
)
|
|
39
34
|
|
|
40
35
|
def test_response_getting_call_even_list(self):
|
|
41
|
-
even_list = [
|
|
42
|
-
expected_dict = {
|
|
36
|
+
even_list = ["key", "value"]
|
|
37
|
+
expected_dict = {"key": "value"}
|
|
43
38
|
raw_response = FakeResponse(even_list)
|
|
44
39
|
|
|
45
|
-
response = UserManagementResponse(
|
|
46
|
-
raw_response,
|
|
47
|
-
1,
|
|
48
|
-
"Getting call even list"
|
|
49
|
-
)
|
|
40
|
+
response = UserManagementResponse(raw_response, 1, "Getting call even list")
|
|
50
41
|
|
|
51
42
|
self.assertEqual(response.get_data(), expected_dict)
|
|
52
43
|
|
|
53
44
|
def test_response_getting_call_odd_list(self):
|
|
54
|
-
odd_list = [
|
|
55
|
-
expected_dict = {
|
|
45
|
+
odd_list = ["key", "value", "key2"]
|
|
46
|
+
expected_dict = {"key": "value"}
|
|
56
47
|
raw_response = FakeResponse(odd_list)
|
|
57
48
|
|
|
58
|
-
response = UserManagementResponse(
|
|
59
|
-
raw_response,
|
|
60
|
-
1,
|
|
61
|
-
"Getting call odd list"
|
|
62
|
-
)
|
|
49
|
+
response = UserManagementResponse(raw_response, 1, "Getting call odd list")
|
|
63
50
|
|
|
64
51
|
self.assertEqual(response.get_data(), expected_dict)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
class MobileTicketConfiguration:
|
|
3
|
-
process_id = "Process-325351399237c1e69144b17e471b1b51"
|
|
4
|
-
activity_id = "Activity-90f09a366cd9426695ef0e21faeb4ed2"
|
|
5
|
-
type = "Petición"
|
|
6
|
-
queue = "Serveis mòbil::Provisió mòbil"
|
|
7
|
-
state = "new"
|
|
8
|
-
priority = "3 normal"
|
|
9
|
-
|
|
10
|
-
def __init__(self, otrs_configuration=None):
|
|
11
|
-
if otrs_configuration:
|
|
12
|
-
self.process_id = otrs_configuration.mobile_process_id
|
|
13
|
-
self.activity_id = otrs_configuration.mobile_activity_id
|
|
14
|
-
self.type = otrs_configuration.mobile_ticket_type
|
|
15
|
-
self.queue = otrs_configuration.mobile_ticket_queue
|
|
16
|
-
self.state = otrs_configuration.mobile_ticket_state
|
|
17
|
-
self.priority = otrs_configuration.mobile_ticket_priority
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
otrs_somconnexio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
otrs_somconnexio/client.py,sha256=YPwEdK61TFbPo9OPrHotKTADfLSKQEJMPw0ZYTtU5K0,5747
|
|
3
|
-
otrs_somconnexio/exceptions.py,sha256=BOjiJS1dUJx_UAz3mfxjbsmX6DeZf9_1FazjMF_97E0,1603
|
|
4
|
-
otrs_somconnexio/otrs_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
otrs_somconnexio/otrs_models/abstract_article.py,sha256=GOzRwvHffxF282o5CQxnc5rLq0H6yRA32kRmWL0cpiE,325
|
|
6
|
-
otrs_somconnexio/otrs_models/adsl_data.py,sha256=McELmckZn9d25nfjuJQDUYl0bsAb4xs4folBWh-ZANU,1734
|
|
7
|
-
otrs_somconnexio/otrs_models/adsl_dynamic_fields.py,sha256=YnS3LYIwtPBhMmw_46RnxB8s79q1c9CyLgfBDf6w3fE,614
|
|
8
|
-
otrs_somconnexio/otrs_models/adsl_ticket.py,sha256=GD0GHedSBtFiga8ZM9Oc6PHEfXPenUf5jTp2h-pfxbU,819
|
|
9
|
-
otrs_somconnexio/otrs_models/coverage_article.py,sha256=mRB2AKpeBYhtM-bOUSYR1Yc3JS9I0BAZQatsHENqAVQ,862
|
|
10
|
-
otrs_somconnexio/otrs_models/coverage_ticket.py,sha256=gzcR-ktLgGl7uK3RPQQ1VFwfxH9m4Wn7T3nqZZ9sMCk,690
|
|
11
|
-
otrs_somconnexio/otrs_models/customer_data.py,sha256=F70O2wlmXw5-ySZBbThcC5h_9nMlZxjGTo0ZmIRv40Y,414
|
|
12
|
-
otrs_somconnexio/otrs_models/customer_user.py,sha256=k-fEpWby6rl6rf9AuGle_QZ8NP_HRJX2dGCWnfW2oWw,981
|
|
13
|
-
otrs_somconnexio/otrs_models/fiber_data.py,sha256=N5bJ5_Rxe1O3lmX6iLSqGzjGx17GsoW-ZWTlpJqRUT8,1618
|
|
14
|
-
otrs_somconnexio/otrs_models/fiber_dynamic_fields.py,sha256=_nwFOClY_CkeFTe_80Jy3_xp5LQ2RKIPkMz9wXPnETI,414
|
|
15
|
-
otrs_somconnexio/otrs_models/fiber_ticket.py,sha256=yuiLE3gXer1jl81mxgY5kphjr7Ug0-oWeCQ5Irdt9Cc,827
|
|
16
|
-
otrs_somconnexio/otrs_models/internet_dynamic_fields.py,sha256=eRAfRYftGXeLIXwq4fxYtvfEEnqOUgJFfMwPXuk5yBk,3790
|
|
17
|
-
otrs_somconnexio/otrs_models/mobile_data.py,sha256=j9-gonMdX9bAW1YwWxbUYozlnH2GYjRAIey1HDibpVs,682
|
|
18
|
-
otrs_somconnexio/otrs_models/mobile_dynamic_fields.py,sha256=qYezXJ21poidpGLGaWypqpSTUtPN_wHFtbi0maCwgfs,1904
|
|
19
|
-
otrs_somconnexio/otrs_models/mobile_ticket.py,sha256=hdBYaUl5Yc7QZY_ntF47JEFr9yh0u9_Lm6hO0xybyBQ,834
|
|
20
|
-
otrs_somconnexio/otrs_models/providers.py,sha256=tPQfdh3JMG_jykHSJUWbfJrO2bph8-2rYzrIqyI2atw,137
|
|
21
|
-
otrs_somconnexio/otrs_models/provision_article.py,sha256=q9usfu5pGDUiiWsmMv__GyC_fRaRlZikiCMc3EZE3KA,290
|
|
22
|
-
otrs_somconnexio/otrs_models/provision_dynamic_fields.py,sha256=qf-iE_bilA0q880xfR5KNED2g4dEzAkpct30q-eipRU,2137
|
|
23
|
-
otrs_somconnexio/otrs_models/provision_ticket.py,sha256=0PE8iGeVKQZRqwajy5i7uHoV6d93GjJysd1rNBvffEs,2114
|
|
24
|
-
otrs_somconnexio/otrs_models/service.py,sha256=qo-8LXMfKMr7_YZPdo7qr68_EIZd1sVwZgkFbfnfxNg,1390
|
|
25
|
-
otrs_somconnexio/otrs_models/telecom_company.py,sha256=VHugq2j6sJo81-SY1r3Sk164o86nVdeMuruAqm2sNuY,3075
|
|
26
|
-
otrs_somconnexio/otrs_models/ticket_factory.py,sha256=y56dCLDN1oN99u-GD3hCscrkWJyeO7qFtEldLZKdCqU,1190
|
|
27
|
-
otrs_somconnexio/otrs_models/vf_provisioning_article.py,sha256=JKvAtOQim0M7S3dB4T0naSjjwnfBuJzAsDgk-jCxMZY,578
|
|
28
|
-
otrs_somconnexio/otrs_models/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
otrs_somconnexio/otrs_models/configurations/adsl_ticket.py,sha256=rP0s9ogDqthllVajZuWMIEQ6r5EHTHNdYPzzuoGponw,838
|
|
30
|
-
otrs_somconnexio/otrs_models/configurations/fiber_ticket.py,sha256=bxiXJfEWipof70L36dRVyiYmiPorI0Oa6zB9mi3Jm2Y,846
|
|
31
|
-
otrs_somconnexio/otrs_models/configurations/mobile_ticket.py,sha256=mm0WFmRwVkareXfkMNj_l7ouYnFgVEbeY8n-uQX5PJM,762
|
|
32
|
-
otrs_somconnexio/otrs_models/coverage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
otrs_somconnexio/otrs_models/coverage/adsl.py,sha256=vGif7cZTVjR89uFvMnvLdH0uZCrM70yDhVJDDZGQqfE,475
|
|
34
|
-
otrs_somconnexio/otrs_models/coverage/mm_fibre.py,sha256=ZwY-e1AIbzfk_ytm1bKeNGbJjP2pCbBOvi2oMyd5xv8,208
|
|
35
|
-
otrs_somconnexio/otrs_models/coverage/vdf_fibre.py,sha256=SIRpjSvRC9hIhIHPjzLE0VLwdzhL13PPAgjyqT69_7I,238
|
|
36
|
-
otrs_somconnexio/otrs_models/process_ticket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
otrs_somconnexio/otrs_models/process_ticket/internet.py,sha256=v73Q1thf2-6r-pUYF_iXSqJ9iZYdXBIwl3BRV76_0k8,5282
|
|
38
|
-
otrs_somconnexio/otrs_models/process_ticket/mobile.py,sha256=H1571HbJ3uHFBrak5DzqZAg9JvSyqGirHnsximrkkSw,2474
|
|
39
|
-
otrs_somconnexio/responses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
-
otrs_somconnexio/responses/ticket_creation.py,sha256=RICJkKcyzVsVqfWVoE-MhhjIai6tsA3rc5EfBHclH-0,736
|
|
41
|
-
otrs_somconnexio/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
-
otrs_somconnexio/services/mapping_mobile_minutes.py,sha256=cGzs_UI06rDE0ol_9FjIODjStL9vSFtNHaxjU4OM2iE,257
|
|
43
|
-
otrs_somconnexio/services/mapping_services.py,sha256=emf9OBPiqtkiBojtcNrmcM_ZODotpZlsnOMDdBuT4z0,298
|
|
44
|
-
otrs_somconnexio/services/update_process_ticket_with_VF_provisioning.py,sha256=ZOp56hX_SmOvDaxs7tsjuu79ozGF29nhxo3WxYkrENI,877
|
|
45
|
-
otrs_somconnexio/services/update_process_ticket_with_coverage_tickets_info_service.py,sha256=8A0Uh2Jg0Fq9HgkEkPAV-CqaigYoEWQXL700VgvkIg8,851
|
|
46
|
-
otrs_somconnexio/services/update_ticket_with_provider_info.py,sha256=TtMtCAByY835tkAEhkb9kRh5iVa4Gv3jbZ67MSMu1NA,812
|
|
47
|
-
otrs_somconnexio/user_management_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
|
-
otrs_somconnexio/user_management_client/client.py,sha256=rodbQaAF3jyIJx6lmykZptyAFz7hgwig9oSz_M2ixw4,2522
|
|
49
|
-
otrs_somconnexio/user_management_client/user_management_response.py,sha256=7QSxfLsRciQBfNSoGFqCtOs8A9OMMNsvMV3riJ__naI,817
|
|
50
|
-
tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
|
-
tests/data/otrs_raw_responses.py,sha256=yE1vp1yhz4joT2nzeWsiRXluvzo9E59tfk9am2Um1jE,1358
|
|
52
|
-
tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
|
-
tests/integration/test_change_customer_language.py,sha256=ts75vZiJR8IVwlglUpTa3LnvsxnT50Pbt_09aIfBiVU,1291
|
|
54
|
-
tests/integration/test_ticket_factory.py,sha256=kihMU0TaumNfPrJX_z4f3SvvQNCEwGfz0x_kOqmMqGQ,4860
|
|
55
|
-
tests/integration/test_update_ticket_with_coverage_data.py,sha256=p9jUKPop9j9gNZQkdWcbrgOvmqINbmmA5xF3PTGygJQ,1900
|
|
56
|
-
tests/otrs_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
-
tests/otrs_models/test_abstract_article.py,sha256=DgDJOAGfnJ7mq_JeLQMZiWKOcqoWS2ivMDzlodq8D0U,820
|
|
58
|
-
tests/otrs_models/test_adsl_data.py,sha256=GpPSDMzFf6fYWhSpHcttMeaYXaHqHw0mAhFDeOCxhkw,1162
|
|
59
|
-
tests/otrs_models/test_adsl_dynamic_fields.py,sha256=07sJ5FYYCJhvmJak1yXBa9_Pw3HjP5xef71qeci8HSw,15624
|
|
60
|
-
tests/otrs_models/test_adsl_ticket.py,sha256=GaHbxaya9YrOD-LanF88L6lRZ_179qNEExmpphdLxLs,4589
|
|
61
|
-
tests/otrs_models/test_coverage_article.py,sha256=1r0jbVPgvw-ChbRvEZziWwCMZT7CG9N40f2YLEGBhG0,1497
|
|
62
|
-
tests/otrs_models/test_coverage_ticket.py,sha256=yNhSt_XVGwe4Z4yVMXls24y5S5wLaIoL9WaHGE8tlWs,995
|
|
63
|
-
tests/otrs_models/test_customer_user.py,sha256=yCR1cCL02w91_O4uqH32fEQv0Em8ZJDdBZ3bvEW7VaA,2231
|
|
64
|
-
tests/otrs_models/test_fiber_data.py,sha256=pkh7zx8DiO2yQ0bdlrQKfyGEKNuFf8RZee3E772kDDk,1111
|
|
65
|
-
tests/otrs_models/test_fiber_dynamic_fields.py,sha256=80K3lLht-MG7uX2q_rqS6XD2PhBfVKvH2LAchRWFFAs,15558
|
|
66
|
-
tests/otrs_models/test_fiber_ticket.py,sha256=w9jSqbopuXpO4uUi3NHzR2IG1g8qhc74Ppd3GNps5qE,4576
|
|
67
|
-
tests/otrs_models/test_mobile_data.py,sha256=cjNbe78a8Dtvl3NvH-yuM03Rba2TYVwc_H4FccnoSt8,661
|
|
68
|
-
tests/otrs_models/test_mobile_dynamic_fields.py,sha256=Bxi9ElSeDiegNl_evsCNKdPEADpLXlMO1TMkuxq-BpA,10928
|
|
69
|
-
tests/otrs_models/test_mobile_ticket.py,sha256=c9GkZ7wX_SonZteR7c3yHCZR7P6TJQseDgK0mJov8fE,5047
|
|
70
|
-
tests/otrs_models/test_service.py,sha256=qXWC6ysiK_ZxQsbvajrI3St6i4kFu8BUIEE_pJ5UwAc,5104
|
|
71
|
-
tests/otrs_models/test_telecom_company.py,sha256=h4RM_ocShFsxatv5xzQlIQUT8HE-pMShuifoty7sRT8,1450
|
|
72
|
-
tests/otrs_models/test_ticket_factory.py,sha256=LeXG-MXbD82bsmc7pcOBJJV7FncJcjbhc5s0bEhFa1g,1776
|
|
73
|
-
tests/otrs_models/test_vf_provisioning_article.py,sha256=aRY6WRtCA0nGLIW8-GMsO2YJ9w2VJXhYei0-d9rDZPo,855
|
|
74
|
-
tests/otrs_models/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
|
-
tests/otrs_models/configuration/test_adsl_ticket.py,sha256=MC_AQTDcJSFi3XI6IittBG3ifaMh5DNeV3k0oexiVpU,1272
|
|
76
|
-
tests/otrs_models/configuration/test_fiber_ticket.py,sha256=Wu5PyJAtWLnR511eY8DI4v-U3Ki_zhGR78M_wk7CUUI,1296
|
|
77
|
-
tests/otrs_models/configuration/test_mobile_ticket.py,sha256=OP9cKyfiPND9Zize3eD5qdZ_QxgTC0DLPUYWm5C98E8,1320
|
|
78
|
-
tests/otrs_models/process_ticket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
-
tests/otrs_models/process_ticket/test_internet_process_ticket.py,sha256=PCTiZjCpMCvz6W984VWgsLVkaAezopKAMSN3sv7i0cE,8285
|
|
80
|
-
tests/otrs_models/process_ticket/test_mobile_process_ticket.py,sha256=lXPIM5aUfKuEpEX3xIgZ67_gQbOqrV_C2Y2LvaQ5eEA,4143
|
|
81
|
-
tests/responses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
|
-
tests/responses/test_ticket_creation.py,sha256=2rnoru7je9qkWHzrQbWQgtrAjFETZOphvEo28xwOkyo,1068
|
|
83
|
-
tests/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
|
-
tests/services/test_mapping_mobile_minutes.py,sha256=YdIFTp-r3pQ6YiMh7iS3TBJagOGTuXizCsYRTXY-SKU,794
|
|
85
|
-
tests/services/test_mappint_services.py,sha256=9U5OQUrzr7X1mMjfxKLKT-5XN-Z7u8BjpB1-xNb7xGM,844
|
|
86
|
-
tests/services/test_update_process_ticket_with_VF_provisioning.py,sha256=bQu_CgthQy7kZm1b4eDBcUgKnB2Nx7oV9ltlmrZ-jnI,1446
|
|
87
|
-
tests/services/test_update_process_ticket_with_coverage_tickets_info_service.py,sha256=rG-68D3Wv3NMzo5f99DAp3oe9EwQo2AfN1GD20x0L2E,1366
|
|
88
|
-
tests/services/test_update_ticket_with_provider_info.py,sha256=1VtP44-corKAXNJNt4_CNfW13M8BzLmJbKYOSNo57kQ,1796
|
|
89
|
-
tests/user_management_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
-
tests/user_management_client/test_client.py,sha256=qKWS9d4wU2rR9jLD8xIEl_NfjiPFiLVAxz6rreHujS4,4562
|
|
91
|
-
tests/user_management_client/test_user_management_response.py,sha256=8YIlgITMLNNfdP_iK67zWFgd6swOvs7QySpuQ2TSXNM,1692
|
|
92
|
-
otrs_somconnexio-0.4.4.dist-info/METADATA,sha256=N6978G9C07qFX4_QaAomN4fpI4A-LJL3lByz48Z__c8,3035
|
|
93
|
-
otrs_somconnexio-0.4.4.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
|
|
94
|
-
otrs_somconnexio-0.4.4.dist-info/top_level.txt,sha256=gvMaHGNwusWpSIy-PVyb0CKDIA4-4fXmEVER_2a-OnE,23
|
|
95
|
-
otrs_somconnexio-0.4.4.dist-info/RECORD,,
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
import unittest
|
|
3
|
-
from mock import Mock
|
|
4
|
-
|
|
5
|
-
from otrs_somconnexio.otrs_models.configurations.adsl_ticket import ADSLTicketConfiguration
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class ADSLTicketConfigurationTestCase(unittest.TestCase):
|
|
9
|
-
|
|
10
|
-
def test_init_with_injection(self):
|
|
11
|
-
custom_adsl_config = Mock(spec=[
|
|
12
|
-
'adsl_process_id',
|
|
13
|
-
'adsl_activity_id',
|
|
14
|
-
'adsl_ticket_type',
|
|
15
|
-
'adsl_ticket_queue',
|
|
16
|
-
'adsl_ticket_state',
|
|
17
|
-
'adsl_ticket_proprity'
|
|
18
|
-
])
|
|
19
|
-
|
|
20
|
-
otrs_config = ADSLTicketConfiguration(custom_adsl_config)
|
|
21
|
-
|
|
22
|
-
self.assertEqual(
|
|
23
|
-
otrs_config.process_id,
|
|
24
|
-
custom_adsl_config.adsl_process_id
|
|
25
|
-
)
|
|
26
|
-
self.assertEqual(
|
|
27
|
-
otrs_config.activity_id,
|
|
28
|
-
custom_adsl_config.adsl_activity_id
|
|
29
|
-
)
|
|
30
|
-
self.assertEqual(
|
|
31
|
-
otrs_config.type,
|
|
32
|
-
custom_adsl_config.adsl_ticket_type
|
|
33
|
-
)
|
|
34
|
-
self.assertEqual(
|
|
35
|
-
otrs_config.queue,
|
|
36
|
-
custom_adsl_config.adsl_ticket_queue
|
|
37
|
-
)
|
|
38
|
-
self.assertEqual(
|
|
39
|
-
otrs_config.state,
|
|
40
|
-
custom_adsl_config.adsl_ticket_state
|
|
41
|
-
)
|
|
42
|
-
self.assertEqual(
|
|
43
|
-
otrs_config.priority,
|
|
44
|
-
custom_adsl_config.adsl_ticket_proprity
|
|
45
|
-
)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
import unittest
|
|
3
|
-
from mock import Mock
|
|
4
|
-
|
|
5
|
-
from otrs_somconnexio.otrs_models.configurations.fiber_ticket import FiberTicketConfiguration
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class FiberTicketConfigurationTestCase(unittest.TestCase):
|
|
9
|
-
|
|
10
|
-
def test_init_with_injection(self):
|
|
11
|
-
custom_fiber_config = Mock(spec=[
|
|
12
|
-
'fiber_process_id',
|
|
13
|
-
'fiber_activity_id',
|
|
14
|
-
'fiber_ticket_type',
|
|
15
|
-
'fiber_ticket_queue',
|
|
16
|
-
'fiber_ticket_state',
|
|
17
|
-
'fiber_ticket_proprity'
|
|
18
|
-
])
|
|
19
|
-
|
|
20
|
-
otrs_config = FiberTicketConfiguration(custom_fiber_config)
|
|
21
|
-
|
|
22
|
-
self.assertEqual(
|
|
23
|
-
otrs_config.process_id,
|
|
24
|
-
custom_fiber_config.fiber_process_id
|
|
25
|
-
)
|
|
26
|
-
self.assertEqual(
|
|
27
|
-
otrs_config.activity_id,
|
|
28
|
-
custom_fiber_config.fiber_activity_id
|
|
29
|
-
)
|
|
30
|
-
self.assertEqual(
|
|
31
|
-
otrs_config.type,
|
|
32
|
-
custom_fiber_config.fiber_ticket_type
|
|
33
|
-
)
|
|
34
|
-
self.assertEqual(
|
|
35
|
-
otrs_config.queue,
|
|
36
|
-
custom_fiber_config.fiber_ticket_queue
|
|
37
|
-
)
|
|
38
|
-
self.assertEqual(
|
|
39
|
-
otrs_config.state,
|
|
40
|
-
custom_fiber_config.fiber_ticket_state
|
|
41
|
-
)
|
|
42
|
-
self.assertEqual(
|
|
43
|
-
otrs_config.priority,
|
|
44
|
-
custom_fiber_config.fiber_ticket_proprity
|
|
45
|
-
)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
import unittest
|
|
3
|
-
from mock import Mock
|
|
4
|
-
|
|
5
|
-
from otrs_somconnexio.otrs_models.configurations.mobile_ticket import MobileTicketConfiguration
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class MobileTicketConfigurationTestCase(unittest.TestCase):
|
|
9
|
-
|
|
10
|
-
def test_init_with_injection(self):
|
|
11
|
-
custom_mobile_config = Mock(spec=[
|
|
12
|
-
'mobile_process_id',
|
|
13
|
-
'mobile_activity_id',
|
|
14
|
-
'mobile_ticket_type',
|
|
15
|
-
'mobile_ticket_queue',
|
|
16
|
-
'mobile_ticket_state',
|
|
17
|
-
'mobile_ticket_priority'
|
|
18
|
-
])
|
|
19
|
-
|
|
20
|
-
otrs_config = MobileTicketConfiguration(custom_mobile_config)
|
|
21
|
-
|
|
22
|
-
self.assertEqual(
|
|
23
|
-
otrs_config.process_id,
|
|
24
|
-
custom_mobile_config.mobile_process_id
|
|
25
|
-
)
|
|
26
|
-
self.assertEqual(
|
|
27
|
-
otrs_config.activity_id,
|
|
28
|
-
custom_mobile_config.mobile_activity_id
|
|
29
|
-
)
|
|
30
|
-
self.assertEqual(
|
|
31
|
-
otrs_config.type,
|
|
32
|
-
custom_mobile_config.mobile_ticket_type
|
|
33
|
-
)
|
|
34
|
-
self.assertEqual(
|
|
35
|
-
otrs_config.queue,
|
|
36
|
-
custom_mobile_config.mobile_ticket_queue
|
|
37
|
-
)
|
|
38
|
-
self.assertEqual(
|
|
39
|
-
otrs_config.state,
|
|
40
|
-
custom_mobile_config.mobile_ticket_state
|
|
41
|
-
)
|
|
42
|
-
self.assertEqual(
|
|
43
|
-
otrs_config.priority,
|
|
44
|
-
custom_mobile_config.mobile_ticket_priority
|
|
45
|
-
)
|
|
File without changes
|