otrs-somconnexio 0.6.3__py2.py3-none-any.whl → 0.6.4__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/otrs_models/configurations/changes/change_pack.py +6 -0
- otrs_somconnexio/otrs_models/configurations/querys/check_coverage.py +1 -0
- otrs_somconnexio/otrs_models/configurations/querys/we_call_you.py +1 -0
- otrs_somconnexio/otrs_models/ticket_types/base_ticket.py +5 -1
- otrs_somconnexio/otrs_models/ticket_types/change_pack_not_shared_data.py +36 -0
- otrs_somconnexio/otrs_models/ticket_types/check_coverage_ticket.py +3 -0
- otrs_somconnexio/otrs_models/ticket_types/we_call_you_ticket.py +3 -0
- {otrs_somconnexio-0.6.3.dist-info → otrs_somconnexio-0.6.4.dist-info}/METADATA +1 -1
- {otrs_somconnexio-0.6.3.dist-info → otrs_somconnexio-0.6.4.dist-info}/RECORD +24 -21
- tests/otrs_models/ticket_types/test_add_data.py +1 -0
- tests/otrs_models/ticket_types/test_change_email.py +2 -0
- tests/otrs_models/ticket_types/test_change_iban.py +1 -0
- tests/otrs_models/ticket_types/test_change_owner.py +1 -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 +1 -0
- tests/otrs_models/ticket_types/test_change_tariff.py +5 -0
- tests/otrs_models/ticket_types/test_change_tariff_adsl_landline.py +1 -0
- tests/otrs_models/ticket_types/test_change_tariff_adsl_out_landline.py +1 -0
- tests/otrs_models/ticket_types/test_change_tariff_fiber.py +2 -0
- tests/otrs_models/ticket_types/test_check_coverage.py +1 -0
- tests/otrs_models/ticket_types/test_shared_bond.py +1 -0
- tests/otrs_models/ticket_types/test_we_call_you.py +1 -0
- {otrs_somconnexio-0.6.3.dist-info → otrs_somconnexio-0.6.4.dist-info}/WHEEL +0 -0
- {otrs_somconnexio-0.6.3.dist-info → otrs_somconnexio-0.6.4.dist-info}/top_level.txt +0 -0
|
@@ -45,6 +45,9 @@ class BaseTicket:
|
|
|
45
45
|
def _get_priority(self):
|
|
46
46
|
return "3 normal"
|
|
47
47
|
|
|
48
|
+
def _get_service(self):
|
|
49
|
+
return False
|
|
50
|
+
|
|
48
51
|
def _get_queue_id(self):
|
|
49
52
|
raise NotImplementedError("Tickets must implement _get_queue_id")
|
|
50
53
|
|
|
@@ -77,6 +80,7 @@ class BaseTicket:
|
|
|
77
80
|
"Priority": self._get_priority(),
|
|
78
81
|
"CustomerUser": self.customer_code,
|
|
79
82
|
"CustomerID": self.customer_code,
|
|
83
|
+
"Service": self._get_service(),
|
|
80
84
|
}
|
|
81
85
|
)
|
|
82
86
|
|
|
@@ -131,7 +135,7 @@ class BaseTicket:
|
|
|
131
135
|
article=article,
|
|
132
136
|
dynamic_fields=dynamic_fields,
|
|
133
137
|
State=state,
|
|
134
|
-
attachments=attachments
|
|
138
|
+
attachments=attachments,
|
|
135
139
|
)
|
|
136
140
|
|
|
137
141
|
def _client(self):
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from otrs_somconnexio.otrs_models.configurations.changes.change_pack import (
|
|
2
|
+
ChangePackNotSharedDataTicketConfiguration,
|
|
3
|
+
)
|
|
4
|
+
from .base_customer_ticket import BaseCustomerTicket
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ChangePackNotSharedDataTicket(BaseCustomerTicket):
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
username,
|
|
11
|
+
customer_code,
|
|
12
|
+
fields_dict,
|
|
13
|
+
override_ticket_ids=[],
|
|
14
|
+
fallback_path="/tmp/tickets/",
|
|
15
|
+
):
|
|
16
|
+
super(ChangePackNotSharedDataTicket, self).__init__(
|
|
17
|
+
username, customer_code, fields_dict, override_ticket_ids, fallback_path
|
|
18
|
+
)
|
|
19
|
+
self.configuration = ChangePackNotSharedDataTicketConfiguration()
|
|
20
|
+
|
|
21
|
+
def _get_queue_id(self):
|
|
22
|
+
return self.configuration.queue_id
|
|
23
|
+
|
|
24
|
+
def _get_subject(self):
|
|
25
|
+
return self.configuration.subject
|
|
26
|
+
|
|
27
|
+
def _get_service(self):
|
|
28
|
+
return self.configuration.service
|
|
29
|
+
|
|
30
|
+
def _get_dynamic_fields(self):
|
|
31
|
+
return {
|
|
32
|
+
"refOdooContract": ";".join(self.fields["selected_subscriptions"]),
|
|
33
|
+
"fibraSenseFix": self._transform_boolean_df(
|
|
34
|
+
self.fields["fiber_without_landline"]
|
|
35
|
+
),
|
|
36
|
+
}
|
|
@@ -30,6 +30,9 @@ class CheckCoverageTicket(BaseCustomerTicket):
|
|
|
30
30
|
def _get_subject(self):
|
|
31
31
|
return self.configuration.subject
|
|
32
32
|
|
|
33
|
+
def _get_service(self):
|
|
34
|
+
return self.configuration.service
|
|
35
|
+
|
|
33
36
|
def _get_dynamic_fields(self):
|
|
34
37
|
return {
|
|
35
38
|
"nomSoci": self.fields["name"],
|
|
@@ -30,6 +30,9 @@ class WeCallYouTicket(BaseCustomerTicket):
|
|
|
30
30
|
def _get_subject(self):
|
|
31
31
|
return self.configuration.subject
|
|
32
32
|
|
|
33
|
+
def _get_service(self):
|
|
34
|
+
return self.configuration.service
|
|
35
|
+
|
|
33
36
|
def _get_dynamic_fields(self):
|
|
34
37
|
return {
|
|
35
38
|
"personaContacte": self.fields["name"],
|
|
@@ -38,6 +38,7 @@ otrs_somconnexio/otrs_models/configurations/changes/add_data.py,sha256=qI3vaJkjl
|
|
|
38
38
|
otrs_somconnexio/otrs_models/configurations/changes/change_email.py,sha256=g_O5_Ca7AwwWncMVugIGHPbd42hQ8F--uRvJAA1qAJY,523
|
|
39
39
|
otrs_somconnexio/otrs_models/configurations/changes/change_iban.py,sha256=Rj5MrXVnoNKKY_0NL5wLwbKjOSOhenpQNMdgm4PyuDM,304
|
|
40
40
|
otrs_somconnexio/otrs_models/configurations/changes/change_owner.py,sha256=1OgPvyezqnSbRW6pGqKaJq1IlwZz74J3Pjm9qmLjDCQ,704
|
|
41
|
+
otrs_somconnexio/otrs_models/configurations/changes/change_pack.py,sha256=dgVAVMbmR6gkykPDfGnZccnWYz2FntBSaqVkoERohRE,264
|
|
41
42
|
otrs_somconnexio/otrs_models/configurations/changes/change_shared_bond.py,sha256=zbpFwQsHHmBMSRAsof0dJIQ6MMSCUkZjAvFyad6215M,251
|
|
42
43
|
otrs_somconnexio/otrs_models/configurations/changes/change_tariff.py,sha256=VrbajGqET099XKyvA6QYkK4WvKd_zwn0v1bhzvqbwiU,1215
|
|
43
44
|
otrs_somconnexio/otrs_models/configurations/changes/change_tariff_adsl.py,sha256=eT1wwUXmlJ0ZUeCunv0tPLo964abcwFr-Pj0bXIc7tU,710
|
|
@@ -49,8 +50,8 @@ otrs_somconnexio/otrs_models/configurations/provision/mobile_ticket.py,sha256=bh
|
|
|
49
50
|
otrs_somconnexio/otrs_models/configurations/provision/router_4G_ticket.py,sha256=hkDaHFAAMFI8gnCZBVns9GLgEb_Cz3BlkoStPt3UZjw,259
|
|
50
51
|
otrs_somconnexio/otrs_models/configurations/provision/switchboard_ticket.py,sha256=ZVLqodwES2-VbJlzDzkIunm3Fbb7xStuV_gd0M_krx4,329
|
|
51
52
|
otrs_somconnexio/otrs_models/configurations/querys/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
|
-
otrs_somconnexio/otrs_models/configurations/querys/check_coverage.py,sha256=
|
|
53
|
-
otrs_somconnexio/otrs_models/configurations/querys/we_call_you.py,sha256=
|
|
53
|
+
otrs_somconnexio/otrs_models/configurations/querys/check_coverage.py,sha256=kHG3JKHnwo7DcRIUwogJ-1vuaYlNItUlcYzQ8Q1eBY8,511
|
|
54
|
+
otrs_somconnexio/otrs_models/configurations/querys/we_call_you.py,sha256=37l7WMWgjDBuTj4Y2NiHW6BNYNCPEY2pMgj7DIStWUE,815
|
|
54
55
|
otrs_somconnexio/otrs_models/coverage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
56
|
otrs_somconnexio/otrs_models/coverage/adsl.py,sha256=ZiLbEEKSlwCl3smHkEAnHrG6BRDWBuNXOouC5LpYRgM,476
|
|
56
57
|
otrs_somconnexio/otrs_models/coverage/asociatel_fiber.py,sha256=TXk5WChGupb8X2i5cBj7kG5TTDix36vdW5i-Hlk5-g8,165
|
|
@@ -66,10 +67,11 @@ otrs_somconnexio/otrs_models/ticket_types/add_data_ticket.py,sha256=wsWWYy82G_Mv
|
|
|
66
67
|
otrs_somconnexio/otrs_models/ticket_types/base_change_tariff_ba_ticket.py,sha256=x3uxLQKvYmBycTwtkccbNgWqIeF-ALj4ymFjbt9R9cE,870
|
|
67
68
|
otrs_somconnexio/otrs_models/ticket_types/base_change_ticket.py,sha256=qkXbdaYNDIVdAJ1JYi0bQ-3OKJJerb5JVQHK6CNl6EA,903
|
|
68
69
|
otrs_somconnexio/otrs_models/ticket_types/base_customer_ticket.py,sha256=r8vSasG5e613UDTgdnP6D5omr77fCjWTIbxWFg986ZQ,624
|
|
69
|
-
otrs_somconnexio/otrs_models/ticket_types/base_ticket.py,sha256=
|
|
70
|
+
otrs_somconnexio/otrs_models/ticket_types/base_ticket.py,sha256=Uo3lItinZAQae_oty4WaP_DpfMbz5JPeAFUmDhRdqcU,4402
|
|
70
71
|
otrs_somconnexio/otrs_models/ticket_types/change_email_ticket.py,sha256=BsblE_YucQZJM_rv34YagLm1NR1AgkXBCp5SyHnQyGw,1077
|
|
71
72
|
otrs_somconnexio/otrs_models/ticket_types/change_iban_ticket.py,sha256=EEraInftDU2Ob22bdgPSgkQePIfRKG9BO2UBhBB1X5o,1068
|
|
72
73
|
otrs_somconnexio/otrs_models/ticket_types/change_owner_ticket.py,sha256=nC9Twi07Bj59IfZeE5CHYqqs21z6FIZeBVB_laafsXE,4243
|
|
74
|
+
otrs_somconnexio/otrs_models/ticket_types/change_pack_not_shared_data.py,sha256=zbM4FQWUXC4WKdobpXNFSWBLKyFlaxFwZ7QYAGsmxrU,1126
|
|
73
75
|
otrs_somconnexio/otrs_models/ticket_types/change_personal_email_ticket.py,sha256=rhY-3oxV1d4DE5FQ-sjQPEVl3l-J_SNV4lkpdtP8m3g,982
|
|
74
76
|
otrs_somconnexio/otrs_models/ticket_types/change_shared_bond_ticket.py,sha256=eRDv0IWhnl6SFyW2Ol3zM081W7PS3rXfUXbb_MkMomk,1152
|
|
75
77
|
otrs_somconnexio/otrs_models/ticket_types/change_tariff_adsl_landline_ticket.py,sha256=aS1xj6e9n6YhhplF7QLequ5kBOzZmx1xlMIP0pWgXXg,908
|
|
@@ -79,8 +81,8 @@ otrs_somconnexio/otrs_models/ticket_types/change_tariff_fiber_ticket.py,sha256=D
|
|
|
79
81
|
otrs_somconnexio/otrs_models/ticket_types/change_tariff_ticket.py,sha256=2oncxRb_U184cYbIdTF8mZN8iFeUdyiE73NF38L0lmk,3074
|
|
80
82
|
otrs_somconnexio/otrs_models/ticket_types/change_tariff_ticket_mobile_pack.py,sha256=pu8QItdaICaX2DMvZ7h29Ii_HJVsKWC2lm6UKl145FQ,1844
|
|
81
83
|
otrs_somconnexio/otrs_models/ticket_types/change_tariff_ticket_shared_bonds.py,sha256=CTesCN0NVD6lfTQMKC7nR6RXGjktfYVWFsthg69EnaQ,731
|
|
82
|
-
otrs_somconnexio/otrs_models/ticket_types/check_coverage_ticket.py,sha256=
|
|
83
|
-
otrs_somconnexio/otrs_models/ticket_types/we_call_you_ticket.py,sha256=
|
|
84
|
+
otrs_somconnexio/otrs_models/ticket_types/check_coverage_ticket.py,sha256=s8lJ1cjrJrvcihZcJ6uZViohPcqwkQg9MOzrUlVcQYs,1937
|
|
85
|
+
otrs_somconnexio/otrs_models/ticket_types/we_call_you_ticket.py,sha256=lvHWT2sQ_tXNzxqfPvybLJJpRnh5bfSLCe2YpV6zDOg,1725
|
|
84
86
|
otrs_somconnexio/responses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
87
|
otrs_somconnexio/responses/ticket_creation.py,sha256=32Iigeg2TO422M2XYaiei57KpimnkB1tgnIexiEhi-E,735
|
|
86
88
|
otrs_somconnexio/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -149,20 +151,21 @@ tests/otrs_models/process_ticket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
|
149
151
|
tests/otrs_models/process_ticket/test_internet_process_ticket.py,sha256=qMbYkMFPfNaBPvyeyb-rVbIPBsou7YwPpOmtT81LpAQ,8446
|
|
150
152
|
tests/otrs_models/process_ticket/test_mobile_process_ticket.py,sha256=j3W7ZVQSOVlvLvGpCE3qycCD-v6_PRhrOGAnReQXw9M,5649
|
|
151
153
|
tests/otrs_models/ticket_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
152
|
-
tests/otrs_models/ticket_types/test_add_data.py,sha256=
|
|
153
|
-
tests/otrs_models/ticket_types/test_change_email.py,sha256=
|
|
154
|
-
tests/otrs_models/ticket_types/test_change_iban.py,sha256=
|
|
155
|
-
tests/otrs_models/ticket_types/test_change_owner.py,sha256=
|
|
156
|
-
tests/otrs_models/ticket_types/
|
|
157
|
-
tests/otrs_models/ticket_types/
|
|
158
|
-
tests/otrs_models/ticket_types/
|
|
159
|
-
tests/otrs_models/ticket_types/
|
|
160
|
-
tests/otrs_models/ticket_types/
|
|
154
|
+
tests/otrs_models/ticket_types/test_add_data.py,sha256=pBiZU9Xg0d0c2sgRx1iPe2Z64Ngx5R_MpjVTK0yA5-Q,2966
|
|
155
|
+
tests/otrs_models/ticket_types/test_change_email.py,sha256=mrefSzO9sefgttu9HfE_ROe1VyYEQ7fPT-Uh8Jqi368,6304
|
|
156
|
+
tests/otrs_models/ticket_types/test_change_iban.py,sha256=uvH8JFkhJM86saB1ohPGYO1_DNO0dIrSYoydqiIyYo4,3198
|
|
157
|
+
tests/otrs_models/ticket_types/test_change_owner.py,sha256=MSeebTtQ_WZcwWmR22WN-eS0bz0jNSiT1PN9Kw7EY2s,9888
|
|
158
|
+
tests/otrs_models/ticket_types/test_change_pack_not_shared_data.py,sha256=F5viARKTpsfI8HtbZmgfyeG84hxNbcC3MT1HHqPBMFQ,2922
|
|
159
|
+
tests/otrs_models/ticket_types/test_change_personal_email.py,sha256=AJa9Mbj-E8kOqbqatFQ8YerTB2RE3SIY6ZSdM9MIXLU,3113
|
|
160
|
+
tests/otrs_models/ticket_types/test_change_tariff.py,sha256=ixSxWBvqWAwiKf7_UfYAiEF2zLGPZ20uxvbzSUyMqJg,17439
|
|
161
|
+
tests/otrs_models/ticket_types/test_change_tariff_adsl_landline.py,sha256=imcUbYUqXQs3o4rW59jRP9NMlmzmT6OoSPymAGaJU0o,4622
|
|
162
|
+
tests/otrs_models/ticket_types/test_change_tariff_adsl_out_landline.py,sha256=7GM5b40Qbo7n5PoE3tKLNL1mRccmAS3mHCeilKeJxNA,4639
|
|
163
|
+
tests/otrs_models/ticket_types/test_change_tariff_fiber.py,sha256=W4jQg5nnZj5wwGReF5S0bK5wXUGmvc5Ud9RHWdfJWQs,6801
|
|
161
164
|
tests/otrs_models/ticket_types/test_change_tariff_mobile_pack.py,sha256=mOitwISCTIKVafY-g5xAnL-tZdCHcL61CCfedxiXSl4,5416
|
|
162
165
|
tests/otrs_models/ticket_types/test_change_tariff_shared_bonds.py,sha256=Mmuai3rMTaBHCmWZCYeDFtx0tH1DiIxwYMUN4pSZFdo,2136
|
|
163
|
-
tests/otrs_models/ticket_types/test_check_coverage.py,sha256=
|
|
164
|
-
tests/otrs_models/ticket_types/test_shared_bond.py,sha256=
|
|
165
|
-
tests/otrs_models/ticket_types/test_we_call_you.py,sha256=
|
|
166
|
+
tests/otrs_models/ticket_types/test_check_coverage.py,sha256=mZCiGBVJc-MJUNOT1-4kYcnRpA7SACiNxir1mwYc2vM,4200
|
|
167
|
+
tests/otrs_models/ticket_types/test_shared_bond.py,sha256=OqfJKmC23ecfI4mbhBeN2UsUJxawPj1lVnVH8i8q65c,3207
|
|
168
|
+
tests/otrs_models/ticket_types/test_we_call_you.py,sha256=fg3sEwBsgJoKeBrLpgSvh9iwaTkZncEmTzQRh2QAulQ,3740
|
|
166
169
|
tests/responses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
170
|
tests/responses/test_ticket_creation.py,sha256=i7Yzps-Kz25Ie1ylr3YAEsUYDMIZTFOvQIpSM2k7lNY,1068
|
|
168
171
|
tests/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -185,7 +188,7 @@ tests/services/test_update_ticket_with_provider_info.py,sha256=cZUg-hNV4BoMwafbp
|
|
|
185
188
|
tests/user_management_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
186
189
|
tests/user_management_client/test_client.py,sha256=088q9H1yf8Hii7zUF17KULqOO-JCxJLsR7vQ8lGHiqg,4410
|
|
187
190
|
tests/user_management_client/test_user_management_response.py,sha256=HCCG7i2f6-ytrRpTzYZHODKCdW-X5GJn-BMVegd5FXg,1539
|
|
188
|
-
otrs_somconnexio-0.6.
|
|
189
|
-
otrs_somconnexio-0.6.
|
|
190
|
-
otrs_somconnexio-0.6.
|
|
191
|
-
otrs_somconnexio-0.6.
|
|
191
|
+
otrs_somconnexio-0.6.4.dist-info/METADATA,sha256=w-MO_36kXtUp_reE3UflwybU3NnM62lpfnPKLVxvEbE,3458
|
|
192
|
+
otrs_somconnexio-0.6.4.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
193
|
+
otrs_somconnexio-0.6.4.dist-info/top_level.txt,sha256=gvMaHGNwusWpSIy-PVyb0CKDIA4-4fXmEVER_2a-OnE,23
|
|
194
|
+
otrs_somconnexio-0.6.4.dist-info/RECORD,,
|
|
@@ -38,6 +38,7 @@ class TestCaseChangeEmailTicket:
|
|
|
38
38
|
"Priority": ChangeEmailTicket._get_priority(self),
|
|
39
39
|
"CustomerUser": customer_code,
|
|
40
40
|
"CustomerID": customer_code,
|
|
41
|
+
"Service": False,
|
|
41
42
|
}
|
|
42
43
|
expected_message = "-"
|
|
43
44
|
expected_article_data = {
|
|
@@ -114,6 +115,7 @@ class TestCaseChangeEmailTicket:
|
|
|
114
115
|
"Priority": ChangeEmailTicket._get_priority(self),
|
|
115
116
|
"CustomerUser": customer_code,
|
|
116
117
|
"CustomerID": customer_code,
|
|
118
|
+
"Service": False,
|
|
117
119
|
}
|
|
118
120
|
expected_message = "-"
|
|
119
121
|
expected_article_data = {
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
from otrs_somconnexio.otrs_models.configurations.changes.change_pack import (
|
|
2
|
+
ChangePackNotSharedDataTicketConfiguration,
|
|
3
|
+
)
|
|
4
|
+
from otrs_somconnexio.otrs_models.ticket_types.change_pack_not_shared_data import (
|
|
5
|
+
ChangePackNotSharedDataTicket,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
username = "7456787G"
|
|
9
|
+
customer_code = "1234"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TestCaseChangePackNotSharedDataTicket:
|
|
13
|
+
def test_create(self, mocker):
|
|
14
|
+
OTRSClientMock = mocker.patch(
|
|
15
|
+
"otrs_somconnexio.otrs_models.ticket_types.base_ticket.OTRSClient",
|
|
16
|
+
return_value=mocker.Mock(),
|
|
17
|
+
)
|
|
18
|
+
TicketMock = mocker.patch(
|
|
19
|
+
"otrs_somconnexio.otrs_models.ticket_types.base_ticket.Ticket",
|
|
20
|
+
return_value=mocker.Mock(),
|
|
21
|
+
)
|
|
22
|
+
ArticleMock = mocker.patch(
|
|
23
|
+
"otrs_somconnexio.otrs_models.ticket_types.base_ticket.Article",
|
|
24
|
+
return_value=mocker.Mock(),
|
|
25
|
+
)
|
|
26
|
+
DynamicFieldMock = mocker.patch(
|
|
27
|
+
"otrs_somconnexio.otrs_models.ticket_types.base_ticket.DynamicField",
|
|
28
|
+
return_value=mocker.Mock(),
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
expected_ticket_data = {
|
|
32
|
+
"Title": ChangePackNotSharedDataTicketConfiguration.subject,
|
|
33
|
+
"QueueID": ChangePackNotSharedDataTicketConfiguration.queue_id,
|
|
34
|
+
"State": ChangePackNotSharedDataTicket._get_state(self),
|
|
35
|
+
"Type": ChangePackNotSharedDataTicket._get_type(self),
|
|
36
|
+
"Priority": ChangePackNotSharedDataTicket._get_priority(self),
|
|
37
|
+
"CustomerUser": customer_code,
|
|
38
|
+
"CustomerID": customer_code,
|
|
39
|
+
"Service": ChangePackNotSharedDataTicketConfiguration.service,
|
|
40
|
+
}
|
|
41
|
+
expected_article_data = {
|
|
42
|
+
"Subject": ChangePackNotSharedDataTicketConfiguration.subject,
|
|
43
|
+
"Body": "-",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
fields_dict = {
|
|
47
|
+
"selected_subscriptions": ["111", "222"],
|
|
48
|
+
"fiber_without_landline": True,
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ChangePackNotSharedDataTicket(
|
|
52
|
+
username,
|
|
53
|
+
customer_code,
|
|
54
|
+
fields_dict,
|
|
55
|
+
).create()
|
|
56
|
+
|
|
57
|
+
TicketMock.assert_called_once_with(expected_ticket_data)
|
|
58
|
+
ArticleMock.assert_called_once_with(expected_article_data)
|
|
59
|
+
calls = [
|
|
60
|
+
mocker.call(
|
|
61
|
+
"ProcessManagementProcessID",
|
|
62
|
+
ChangePackNotSharedDataTicketConfiguration.process_id,
|
|
63
|
+
),
|
|
64
|
+
mocker.call(
|
|
65
|
+
"ProcessManagementActivityID",
|
|
66
|
+
ChangePackNotSharedDataTicketConfiguration.activity_id,
|
|
67
|
+
),
|
|
68
|
+
mocker.call("refOdooContract", "111;222"),
|
|
69
|
+
mocker.call("fibraSenseFix", "1"),
|
|
70
|
+
]
|
|
71
|
+
DynamicFieldMock.assert_has_calls(calls)
|
|
72
|
+
OTRSClientMock.return_value.create_otrs_process_ticket.assert_called_once_with( # noqa
|
|
73
|
+
TicketMock.return_value,
|
|
74
|
+
article=ArticleMock.return_value,
|
|
75
|
+
dynamic_fields=[mocker.ANY for call in calls],
|
|
76
|
+
attachments=None,
|
|
77
|
+
)
|
|
@@ -38,6 +38,7 @@ class TestCaseChangePersonalEmail:
|
|
|
38
38
|
"Priority": ChangePersonalEmailTicket._get_priority(self),
|
|
39
39
|
"CustomerUser": customer_code,
|
|
40
40
|
"CustomerID": customer_code,
|
|
41
|
+
"Service": False,
|
|
41
42
|
}
|
|
42
43
|
expected_article_data = {
|
|
43
44
|
"Subject": ChangeEmailPersonalConfiguration.subject,
|
|
@@ -46,6 +46,7 @@ class TestCaseChangeTariffTicket:
|
|
|
46
46
|
"Priority": ChangeTariffTicketConfiguration.priority,
|
|
47
47
|
"CustomerUser": customer_code,
|
|
48
48
|
"CustomerID": customer_code,
|
|
49
|
+
"Service": False,
|
|
49
50
|
}
|
|
50
51
|
expected_article_data = {
|
|
51
52
|
"Subject": "Sol·licitud Canvi de tarifa oficina virtual",
|
|
@@ -123,6 +124,7 @@ class TestCaseChangeTariffTicket:
|
|
|
123
124
|
"Priority": ChangeTariffTicketConfiguration.priority,
|
|
124
125
|
"CustomerUser": customer_code,
|
|
125
126
|
"CustomerID": customer_code,
|
|
127
|
+
"Service": False,
|
|
126
128
|
}
|
|
127
129
|
expected_article_data = {
|
|
128
130
|
"Subject": "Sol·licitud Canvi de tarifa oficina virtual",
|
|
@@ -202,6 +204,7 @@ class TestCaseChangeTariffExceptionalTicket:
|
|
|
202
204
|
"Priority": ChangeTariffExceptionalTicketConfiguration.priority,
|
|
203
205
|
"CustomerUser": customer_code,
|
|
204
206
|
"CustomerID": customer_code,
|
|
207
|
+
"Service": False,
|
|
205
208
|
}
|
|
206
209
|
expected_article_data = {
|
|
207
210
|
"Subject": "Sol·licitud Canvi de tarifa excepcional",
|
|
@@ -287,6 +290,7 @@ class TestCaseChangeTariffMobilePackTicket:
|
|
|
287
290
|
"Priority": ChangeTariffTicketConfiguration.priority,
|
|
288
291
|
"CustomerUser": customer_code,
|
|
289
292
|
"CustomerID": customer_code,
|
|
293
|
+
"Service": False,
|
|
290
294
|
}
|
|
291
295
|
expected_article_data = {
|
|
292
296
|
"Subject": "Sol·licitud canvi de tarifa pack apinyades",
|
|
@@ -375,6 +379,7 @@ class TestCaseChangeTariffSharedBondTicket:
|
|
|
375
379
|
"Priority": ChangeTariffSharedBondTicketConfiguration.priority,
|
|
376
380
|
"CustomerUser": customer_code,
|
|
377
381
|
"CustomerID": customer_code,
|
|
382
|
+
"Service": False,
|
|
378
383
|
}
|
|
379
384
|
expected_article_data = {
|
|
380
385
|
"Subject": "Sol·licitud canvi de tarifa pack amb dades compartides",
|
|
@@ -37,6 +37,7 @@ class TestCaseChangeTariffAdslLandlineTicket:
|
|
|
37
37
|
"Priority": ChangeTariffLandLineADSL._get_priority(self),
|
|
38
38
|
"CustomerUser": customer_code,
|
|
39
39
|
"CustomerID": customer_code,
|
|
40
|
+
"Service": False,
|
|
40
41
|
}
|
|
41
42
|
expected_article_data = {
|
|
42
43
|
"Subject": ChangeTariffTicketAdslLandlineConfig.subject,
|
|
@@ -37,6 +37,7 @@ class TestCaseChangeTariffAdslOutLandlineTicket:
|
|
|
37
37
|
"Priority": ChangeTariffOutLandLineADSL._get_priority(self),
|
|
38
38
|
"CustomerUser": customer_code,
|
|
39
39
|
"CustomerID": customer_code,
|
|
40
|
+
"Service": False,
|
|
40
41
|
}
|
|
41
42
|
expected_article_data = {
|
|
42
43
|
"Subject": ChangeTariffTicketAdslOutLandlineConfig.subject,
|
|
@@ -36,6 +36,7 @@ class TestCaseChangeTariffFiberTicket:
|
|
|
36
36
|
"Priority": ChangeTariffTicketFiber._get_priority(self),
|
|
37
37
|
"CustomerUser": customer_code,
|
|
38
38
|
"CustomerID": customer_code,
|
|
39
|
+
"Service": False,
|
|
39
40
|
}
|
|
40
41
|
expected_article_data = {
|
|
41
42
|
"Subject": ChangeTariffTicketFiberConfiguration.subject,
|
|
@@ -117,6 +118,7 @@ class TestCaseChangeTariffFiberTicket:
|
|
|
117
118
|
"Priority": ChangeTariffTicketFiber._get_priority(self),
|
|
118
119
|
"CustomerUser": customer_code,
|
|
119
120
|
"CustomerID": customer_code,
|
|
121
|
+
"Service": False,
|
|
120
122
|
}
|
|
121
123
|
expected_article_data = {
|
|
122
124
|
"Subject": ChangeTariffTicketFiberConfiguration.subject,
|
|
@@ -20,6 +20,7 @@ class TestCaseChangeSharedBondTicket:
|
|
|
20
20
|
"Priority": configuration.priority,
|
|
21
21
|
"CustomerUser": customer_code,
|
|
22
22
|
"CustomerID": customer_code,
|
|
23
|
+
"Service": False,
|
|
23
24
|
}
|
|
24
25
|
expected_article_data = {
|
|
25
26
|
"Subject": "Sol·licitud Canvi d'abonament compartit oficina virtual",
|
|
File without changes
|
|
File without changes
|