otrs-somconnexio 0.7.1__py2.py3-none-any.whl → 0.7.2__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 +1 -1
- otrs_somconnexio/exceptions.py +15 -3
- otrs_somconnexio/otrs_models/internet_data.py +2 -2
- otrs_somconnexio/otrs_models/mobile_dynamic_fields.py +0 -4
- otrs_somconnexio/otrs_models/provision_dynamic_fields.py +6 -0
- otrs_somconnexio/otrs_models/provision_ticket.py +0 -1
- {otrs_somconnexio-0.7.1.dist-info → otrs_somconnexio-0.7.2.dist-info}/METADATA +1 -1
- {otrs_somconnexio-0.7.1.dist-info → otrs_somconnexio-0.7.2.dist-info}/RECORD +19 -19
- tests/otrs_models/test_adsl_ticket.py +2 -2
- tests/otrs_models/test_fiber_dynamic_fields.py +15 -0
- tests/otrs_models/test_fiber_ticket.py +2 -2
- tests/otrs_models/test_mobile_dynamic_fields.py +16 -0
- tests/otrs_models/test_mobile_ticket.py +2 -3
- tests/otrs_models/test_router_4G_ticket.py +2 -2
- tests/otrs_models/test_switchboard_dynamic_fields.py +7 -0
- tests/otrs_models/test_switchboard_header_ticket.py +1 -3
- tests/otrs_models/test_switchboard_ticket.py +1 -3
- {otrs_somconnexio-0.7.1.dist-info → otrs_somconnexio-0.7.2.dist-info}/WHEEL +0 -0
- {otrs_somconnexio-0.7.1.dist-info → otrs_somconnexio-0.7.2.dist-info}/top_level.txt +0 -0
otrs_somconnexio/client.py
CHANGED
|
@@ -125,7 +125,7 @@ class OTRSClient:
|
|
|
125
125
|
SessionNotCreated,
|
|
126
126
|
ArgumentMissingError,
|
|
127
127
|
) as error:
|
|
128
|
-
raise TicketNotCreated(error.message, dynamic_fields)
|
|
128
|
+
raise TicketNotCreated(error.message, ticket, dynamic_fields)
|
|
129
129
|
return OTRSCreationTicketResponse(client_response)
|
|
130
130
|
|
|
131
131
|
def get_otrs_process_ticket(self, ticket_id):
|
otrs_somconnexio/exceptions.py
CHANGED
|
@@ -21,12 +21,24 @@ class TicketNotCreated(OTRSClientException):
|
|
|
21
21
|
df_msg = df_msg + "{}: {}\n".format(df.name, df.value)
|
|
22
22
|
return df_msg
|
|
23
23
|
|
|
24
|
-
def
|
|
25
|
-
|
|
24
|
+
def _ticket_to_string(self, ticket):
|
|
25
|
+
if not ticket:
|
|
26
|
+
return ""
|
|
27
|
+
ticket_msg = ""
|
|
28
|
+
for field_key in ticket.fields.keys():
|
|
29
|
+
ticket_msg = ticket_msg + "{}: {}\n".format(
|
|
30
|
+
field_key, ticket.fields[field_key]
|
|
31
|
+
)
|
|
32
|
+
return ticket_msg
|
|
33
|
+
|
|
34
|
+
def __init__(self, error_msg, ticket=None, dynamic_fields=None):
|
|
26
35
|
title_message = "Error creating the ticket with the next error message:"
|
|
27
36
|
df_message = self._DF_to_string(dynamic_fields)
|
|
37
|
+
ticket_message = self._ticket_to_string(ticket)
|
|
28
38
|
|
|
29
|
-
message = "{}\n\t{}\n{}".format(
|
|
39
|
+
message = "{}\n\t{}\n{}{}".format(
|
|
40
|
+
title_message, error_msg, ticket_message, df_message
|
|
41
|
+
)
|
|
30
42
|
|
|
31
43
|
super(OTRSClientException, self).__init__(message)
|
|
32
44
|
|
|
@@ -21,8 +21,6 @@ class InternetData(object):
|
|
|
21
21
|
previous_owner_vat,
|
|
22
22
|
previous_owner_name,
|
|
23
23
|
previous_owner_surname,
|
|
24
|
-
notes,
|
|
25
|
-
activation_notes,
|
|
26
24
|
product,
|
|
27
25
|
adsl_coverage,
|
|
28
26
|
mm_fiber_coverage,
|
|
@@ -35,6 +33,8 @@ class InternetData(object):
|
|
|
35
33
|
previous_contract_address="",
|
|
36
34
|
previous_contract_phone="",
|
|
37
35
|
mobile_pack_contracts="",
|
|
36
|
+
notes="",
|
|
37
|
+
activation_notes="",
|
|
38
38
|
confirmed_documentation=False,
|
|
39
39
|
):
|
|
40
40
|
# Common all the Tickets
|
|
@@ -6,7 +6,6 @@ from otrs_somconnexio.otrs_models.provision_dynamic_fields import ProvisionDynam
|
|
|
6
6
|
class MobileDynamicFields(ProvisionDynamicFields):
|
|
7
7
|
def _build_specific_dynamic_fields(self):
|
|
8
8
|
return [
|
|
9
|
-
self._order_id(),
|
|
10
9
|
self._line(),
|
|
11
10
|
self._icc_sc(),
|
|
12
11
|
self._icc_donor(),
|
|
@@ -30,9 +29,6 @@ class MobileDynamicFields(ProvisionDynamicFields):
|
|
|
30
29
|
self._confirm_doc(),
|
|
31
30
|
]
|
|
32
31
|
|
|
33
|
-
def _order_id(self):
|
|
34
|
-
return DynamicField("IDpeticio", self.service_data.order_id)
|
|
35
|
-
|
|
36
32
|
def _line(self):
|
|
37
33
|
return DynamicField("liniaMobil", self.service_data.phone_number)
|
|
38
34
|
|
|
@@ -31,6 +31,7 @@ class ProvisionDynamicFields:
|
|
|
31
31
|
self._lang(),
|
|
32
32
|
self._order_id(),
|
|
33
33
|
self._confirmed_documentation(),
|
|
34
|
+
self._notes(),
|
|
34
35
|
]
|
|
35
36
|
dynamic_fields += self._build_specific_dynamic_fields()
|
|
36
37
|
|
|
@@ -116,3 +117,8 @@ class ProvisionDynamicFields:
|
|
|
116
117
|
"1" if self.service_data.confirmed_documentation else "0"
|
|
117
118
|
)
|
|
118
119
|
return DynamicField(name="confirmarDocumentacio", value=confirmed_documentation)
|
|
120
|
+
|
|
121
|
+
def _notes(self):
|
|
122
|
+
return DynamicField(
|
|
123
|
+
name="consideracionsGenerals", value=self.service_data.notes
|
|
124
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
otrs_somconnexio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
otrs_somconnexio/client.py,sha256=
|
|
3
|
-
otrs_somconnexio/exceptions.py,sha256=
|
|
2
|
+
otrs_somconnexio/client.py,sha256=1pemhw9MZvNnpDrXmp9nLT-oUCdyo6388JH9hlPymxA,7425
|
|
3
|
+
otrs_somconnexio/exceptions.py,sha256=3qha7dtTvXUDtEmnYC-C0vjZqNR41ybbdjatYJC_nEw,2546
|
|
4
4
|
otrs_somconnexio/otrs_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
otrs_somconnexio/otrs_models/abstract_article.py,sha256=6eyMvOOyqs8vVAEbQINvl5K0gMaOyshKVwS-QM0Bb0Q,492
|
|
6
6
|
otrs_somconnexio/otrs_models/adsl_data.py,sha256=mwi5UvGOoSbVSO37PlYeSKpDI9E4DUbXnGy4yRKb2Kg,315
|
|
@@ -13,15 +13,15 @@ otrs_somconnexio/otrs_models/customer_user.py,sha256=9LRUxWQS4gxoBoyFwU_wLb9zXiT
|
|
|
13
13
|
otrs_somconnexio/otrs_models/fiber_data.py,sha256=b8OVbAPBBUUzcQQP5HXRjzm7fvdqlM8keNlGsAF6t9c,576
|
|
14
14
|
otrs_somconnexio/otrs_models/fiber_dynamic_fields.py,sha256=nJzi-vjWhRyWsvH85KxzQ8FjOHkRJFsikkpDLLXZHjA,2559
|
|
15
15
|
otrs_somconnexio/otrs_models/fiber_ticket.py,sha256=dCJBaJqDQWQk3XBvqGSWnpMdgOiyu64dh3xFCOOh7C0,938
|
|
16
|
-
otrs_somconnexio/otrs_models/internet_data.py,sha256=
|
|
16
|
+
otrs_somconnexio/otrs_models/internet_data.py,sha256=BUBZIxSMnccO6RE7Tvf6DtMEMQ1RVX2cYqC_K2BJYtQ,2746
|
|
17
17
|
otrs_somconnexio/otrs_models/internet_dynamic_fields.py,sha256=rsYuGQ8dEyBAqIgyqNVA-76WgCb0y67c3e-Kx9F6MsQ,5018
|
|
18
18
|
otrs_somconnexio/otrs_models/mobile_data.py,sha256=Zl5AlbrtfxT4i6z83sAth_dZcOn0yXFm1AeBMFkG48o,1931
|
|
19
|
-
otrs_somconnexio/otrs_models/mobile_dynamic_fields.py,sha256=
|
|
19
|
+
otrs_somconnexio/otrs_models/mobile_dynamic_fields.py,sha256=qvwWgHRwaktoVF0KP_dfBgRG2n2TKWORIlrW-MWEc-o,3759
|
|
20
20
|
otrs_somconnexio/otrs_models/mobile_ticket.py,sha256=aNtGteRzD-dOtPqqs3KoqggZaeLy_Za1KEBM5aHGCYI,1336
|
|
21
21
|
otrs_somconnexio/otrs_models/providers.py,sha256=Jy5lm_gCuwy_BhpNE5JJ5-TrE8aFQpZvMiYZ-PTlgqs,181
|
|
22
22
|
otrs_somconnexio/otrs_models/provision_article.py,sha256=jONH4lHzjg2jyx_mxjghw503oUT9VI9QwZrJ25HdOS0,469
|
|
23
|
-
otrs_somconnexio/otrs_models/provision_dynamic_fields.py,sha256=
|
|
24
|
-
otrs_somconnexio/otrs_models/provision_ticket.py,sha256=
|
|
23
|
+
otrs_somconnexio/otrs_models/provision_dynamic_fields.py,sha256=gXlshwEl-bXzXGQFlJFZB9BIRKDxP8n479hi9ISusec,4151
|
|
24
|
+
otrs_somconnexio/otrs_models/provision_ticket.py,sha256=hruT5PCiNZUM1SyxlTRTWzc6b2DpXkHJfws61R_CyFw,2735
|
|
25
25
|
otrs_somconnexio/otrs_models/responsible_data.py,sha256=KCXkCNe_NLRpVLzeK8iNlbuH-tYag4YOL-MqnCFXn0g,104
|
|
26
26
|
otrs_somconnexio/otrs_models/router_4G_data.py,sha256=EQIVxVstFswmEcOHzzV1ZyDYaadiU7lbunb5CJg6xAM,194
|
|
27
27
|
otrs_somconnexio/otrs_models/router_4G_dynamic_fields.py,sha256=NVrfwD2Mj1TTzOC8NYna1XQYXEN6ffAfovlP9VAIHh4,403
|
|
@@ -123,28 +123,28 @@ tests/otrs_models/common_helper.py,sha256=WAd7aenHTfHvxjZMlwFfr32ajaF285Y75eifMj
|
|
|
123
123
|
tests/otrs_models/test_abstract_article.py,sha256=udzIihoP0h8Ien20JFz1jLm5Sv2b3wO6f2JZK6zRTKQ,861
|
|
124
124
|
tests/otrs_models/test_adsl_data.py,sha256=_NGpe5mStNyKPhZ5xFVS62jMdMr5vkzp9SusHmFh4r4,1484
|
|
125
125
|
tests/otrs_models/test_adsl_dynamic_fields.py,sha256=MI6ggXsm4nWQnCVfiIoAVdPJu0HjTbexg4sVA5gMJLo,19910
|
|
126
|
-
tests/otrs_models/test_adsl_ticket.py,sha256=
|
|
126
|
+
tests/otrs_models/test_adsl_ticket.py,sha256=lw1BvezIPMJ0oMFgtqljdhdZlGTOkUIYS4Q740vJirM,4518
|
|
127
127
|
tests/otrs_models/test_coverage_article.py,sha256=O_wm0l75m6sBWEcMdLOvBWDNSVXJ89IkL4IijIgiuPk,1519
|
|
128
128
|
tests/otrs_models/test_coverage_ticket.py,sha256=0W4f28BMhtZDvPm71d7YPJuiVi9jUI6WJBbjh3xs0mg,1019
|
|
129
129
|
tests/otrs_models/test_customer_user.py,sha256=9TDojrOsQBqd4kdC8SxvG5Ub18AXkJ_tsYuUeHALZnc,2227
|
|
130
130
|
tests/otrs_models/test_fiber_data.py,sha256=rdFbcqzI49PV2m30vqnBOmZr2rn_MBqC0bJd0K0dcbI,1833
|
|
131
|
-
tests/otrs_models/test_fiber_dynamic_fields.py,sha256=
|
|
132
|
-
tests/otrs_models/test_fiber_ticket.py,sha256=
|
|
131
|
+
tests/otrs_models/test_fiber_dynamic_fields.py,sha256=Rc8qUu_nTiV5Cfm7DxYn4ezO_2SRqQkGT7t6qRXARv4,27097
|
|
132
|
+
tests/otrs_models/test_fiber_ticket.py,sha256=9CeW1x2lZRIF40sD6iPqTGtMlvnKMRvD_uPJx9c5KgU,6361
|
|
133
133
|
tests/otrs_models/test_mobile_data.py,sha256=EBtwJL9kUaThhnKuqpUk6GFv0KS7RhyCF6dJNgr1-m8,1110
|
|
134
|
-
tests/otrs_models/test_mobile_dynamic_fields.py,sha256=
|
|
134
|
+
tests/otrs_models/test_mobile_dynamic_fields.py,sha256=Xi8lj7PCJunwij-VQxqPYnafY2inEqeqQmQfSRFAmOM,19861
|
|
135
135
|
tests/otrs_models/test_mobile_paused_ticket.py,sha256=T7Gyy7hoG994KHXkTWbJVQC_sC1sgZl4C1_sgpx3hwk,1418
|
|
136
|
-
tests/otrs_models/test_mobile_ticket.py,sha256=
|
|
136
|
+
tests/otrs_models/test_mobile_ticket.py,sha256=hFWKdqUpfFOTKAitx9cUPdoIEQu_Hy_tAVOGMuQkgCc,4859
|
|
137
137
|
tests/otrs_models/test_provision_article.py,sha256=SwTA96si0tundnu6lGCJGQcaOpnkRnKUYRKO9NcsflI,1773
|
|
138
138
|
tests/otrs_models/test_router_4G_data.py,sha256=3zKZzWd21j8q4oXFG-Pl1Ugtkp4J0_RZx8HtHRzpfKM,1443
|
|
139
139
|
tests/otrs_models/test_router_4G_dynamic_fields.py,sha256=hwQS4SxPX4OQfIxPMNEvWxJrUirxj3cIaxBsOxLjvqw,21007
|
|
140
|
-
tests/otrs_models/test_router_4G_ticket.py,sha256=
|
|
140
|
+
tests/otrs_models/test_router_4G_ticket.py,sha256=QdMHFOhjxsCa-cxwRIIZMOzPABa6dFTrp4nLdpQXfSk,4799
|
|
141
141
|
tests/otrs_models/test_service.py,sha256=fLFyJ5wE8jszrD9sZlSOebjioR8dv8z2SeGZVcA3r5U,6833
|
|
142
142
|
tests/otrs_models/test_switchboard_data.py,sha256=QlO_vupDFeavLFH1EIXVzRf4qIJ5AtuyvgCg_v4sXTE,1233
|
|
143
|
-
tests/otrs_models/test_switchboard_dynamic_fields.py,sha256=
|
|
143
|
+
tests/otrs_models/test_switchboard_dynamic_fields.py,sha256=E8vysY5tnHAwZRHjzdi_oz7p495pFDFnmJXizVKTXlc,5903
|
|
144
144
|
tests/otrs_models/test_switchboard_header_data.py,sha256=kXkicBHpIaBgVSDDhEIqVgDEu1rpQG0TQLUGL0Jr_3s,534
|
|
145
145
|
tests/otrs_models/test_switchboard_header_dynamic_fields.py,sha256=2xaVzEC9-6NZ9ZMIAOf1GPpfWRw8BG1sn7ZEo86NxuM,3558
|
|
146
|
-
tests/otrs_models/test_switchboard_header_ticket.py,sha256=
|
|
147
|
-
tests/otrs_models/test_switchboard_ticket.py,sha256=
|
|
146
|
+
tests/otrs_models/test_switchboard_header_ticket.py,sha256=j2Wu-02LNgkEBpGoq1IP9sRtGlNkTlIsujZL5h1X7wU,4568
|
|
147
|
+
tests/otrs_models/test_switchboard_ticket.py,sha256=Fwk78xENfMXmkK5x_L8JWLGxh5I64q8BWjX2iT45sTI,4890
|
|
148
148
|
tests/otrs_models/test_telecom_company.py,sha256=nC4uBleU2Lr3qHr5VDo-6kbcTVwKgguC85TcbhTOn1c,1450
|
|
149
149
|
tests/otrs_models/test_ticket_factory.py,sha256=nvye2LK3vfYv3xRNqsBO9M0zYWRWAPWjEFgdDpY1whQ,4048
|
|
150
150
|
tests/otrs_models/test_vf_provisioning_article.py,sha256=Yj8vtaowhxP12K_-FMcJNW-5re3yyCCfGLRHCPYgrVA,897
|
|
@@ -196,7 +196,7 @@ tests/services/test_update_ticket_with_provider_info.py,sha256=cZUg-hNV4BoMwafbp
|
|
|
196
196
|
tests/user_management_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
197
197
|
tests/user_management_client/test_client.py,sha256=088q9H1yf8Hii7zUF17KULqOO-JCxJLsR7vQ8lGHiqg,4410
|
|
198
198
|
tests/user_management_client/test_user_management_response.py,sha256=HCCG7i2f6-ytrRpTzYZHODKCdW-X5GJn-BMVegd5FXg,1539
|
|
199
|
-
otrs_somconnexio-0.7.
|
|
200
|
-
otrs_somconnexio-0.7.
|
|
201
|
-
otrs_somconnexio-0.7.
|
|
202
|
-
otrs_somconnexio-0.7.
|
|
199
|
+
otrs_somconnexio-0.7.2.dist-info/METADATA,sha256=oaqa6am51HTsAPuTTMc1-SxxRH_dVyDOUKhpi7ZJmpw,3458
|
|
200
|
+
otrs_somconnexio-0.7.2.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
201
|
+
otrs_somconnexio-0.7.2.dist-info/top_level.txt,sha256=gvMaHGNwusWpSIy-PVyb0CKDIA4-4fXmEVER_2a-OnE,23
|
|
202
|
+
otrs_somconnexio-0.7.2.dist-info/RECORD,,
|
|
@@ -33,14 +33,14 @@ class ADSLTicketTestCase(unittest.TestCase):
|
|
|
33
33
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.ProvisionArticle")
|
|
34
34
|
def test_build_article(self, MockInternetArticle):
|
|
35
35
|
customer_data = Mock(spec=[])
|
|
36
|
-
service_data = Mock(spec=["order_id", "
|
|
36
|
+
service_data = Mock(spec=["order_id", "technology"])
|
|
37
37
|
|
|
38
38
|
mock_mobile_article = MockInternetArticle.return_value
|
|
39
39
|
|
|
40
40
|
ADSLTicket(service_data, customer_data, None)._build_article()
|
|
41
41
|
|
|
42
42
|
MockInternetArticle.assert_called_with(
|
|
43
|
-
service_data.technology, service_data.order_id, "adsl"
|
|
43
|
+
service_data.technology, service_data.order_id, "adsl"
|
|
44
44
|
)
|
|
45
45
|
mock_mobile_article.call.assert_called_once()
|
|
46
46
|
|
|
@@ -773,3 +773,18 @@ class FiberDynamicFieldsTestCase(unittest.TestCase):
|
|
|
773
773
|
self.assertEqual(
|
|
774
774
|
dynamic_fields_dct["productBAMM"], self.service_data.product_ba_mm
|
|
775
775
|
)
|
|
776
|
+
|
|
777
|
+
def test_consideracions_generals_field(self):
|
|
778
|
+
self.service_data.notes = "General notes"
|
|
779
|
+
dynamic_fields = FiberDynamicFields(
|
|
780
|
+
self.service_data,
|
|
781
|
+
self.customer_data,
|
|
782
|
+
self.fiber_otrs_process_id,
|
|
783
|
+
self.fiber_otrs_activity_id,
|
|
784
|
+
).all()
|
|
785
|
+
|
|
786
|
+
dynamic_fields_dct = dynamic_fields_to_dct(dynamic_fields)
|
|
787
|
+
self.assertEqual(
|
|
788
|
+
dynamic_fields_dct["consideracionsGenerals"],
|
|
789
|
+
self.service_data.notes,
|
|
790
|
+
)
|
|
@@ -57,14 +57,14 @@ class FiberTicketTestCase(unittest.TestCase):
|
|
|
57
57
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.ProvisionArticle")
|
|
58
58
|
def test_build_article(self, MockInternetArticle):
|
|
59
59
|
customer_data = Mock(spec=[])
|
|
60
|
-
service_data = Mock(spec=["order_id", "
|
|
60
|
+
service_data = Mock(spec=["order_id", "technology"])
|
|
61
61
|
|
|
62
62
|
mock_mobile_article = MockInternetArticle.return_value
|
|
63
63
|
|
|
64
64
|
FiberTicket(service_data, customer_data, self.responsible_data)._build_article()
|
|
65
65
|
|
|
66
66
|
MockInternetArticle.assert_called_with(
|
|
67
|
-
service_data.technology, service_data.order_id, "fiber"
|
|
67
|
+
service_data.technology, service_data.order_id, "fiber"
|
|
68
68
|
)
|
|
69
69
|
mock_mobile_article.call.assert_called_once()
|
|
70
70
|
|
|
@@ -44,6 +44,7 @@ class MobileDynamicFieldsTestCase(unittest.TestCase):
|
|
|
44
44
|
"delivery_city",
|
|
45
45
|
"delivery_zip_code",
|
|
46
46
|
"delivery_state",
|
|
47
|
+
"notes",
|
|
47
48
|
"activation_notes",
|
|
48
49
|
"technology",
|
|
49
50
|
"sales_team",
|
|
@@ -576,3 +577,18 @@ class MobileDynamicFieldsTestCase(unittest.TestCase):
|
|
|
576
577
|
|
|
577
578
|
dynamic_fields_dct = dynamic_fields_to_dct(dynamic_fields)
|
|
578
579
|
self.assertEqual(dynamic_fields_dct["confirmDoc"], "no")
|
|
580
|
+
|
|
581
|
+
def test_consideracions_generals_field(self):
|
|
582
|
+
self.mobile_data.notes = "General notes"
|
|
583
|
+
dynamic_fields = MobileDynamicFields(
|
|
584
|
+
self.mobile_data,
|
|
585
|
+
self.customer_data,
|
|
586
|
+
self.mobile_otrs_process_id,
|
|
587
|
+
self.mobile_otrs_activity_id,
|
|
588
|
+
).all()
|
|
589
|
+
|
|
590
|
+
dynamic_fields_dct = dynamic_fields_to_dct(dynamic_fields)
|
|
591
|
+
self.assertEqual(
|
|
592
|
+
dynamic_fields_dct["consideracionsGenerals"],
|
|
593
|
+
self.mobile_data.notes,
|
|
594
|
+
)
|
|
@@ -38,9 +38,8 @@ class MobileTicketTestCase(unittest.TestCase):
|
|
|
38
38
|
|
|
39
39
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.ProvisionArticle")
|
|
40
40
|
def test_build_article(self, MockProvisionArticle):
|
|
41
|
-
mobile_data = Mock(spec=["order_id", "
|
|
41
|
+
mobile_data = Mock(spec=["order_id", "technology"])
|
|
42
42
|
mobile_data.order_id = 123
|
|
43
|
-
mobile_data.notes = "Hola mundo"
|
|
44
43
|
|
|
45
44
|
customer_data = Mock(spec=["order_id"])
|
|
46
45
|
|
|
@@ -49,7 +48,7 @@ class MobileTicketTestCase(unittest.TestCase):
|
|
|
49
48
|
MobileTicket(mobile_data, customer_data, self.responsible_data)._build_article()
|
|
50
49
|
|
|
51
50
|
MockProvisionArticle.assert_called_with(
|
|
52
|
-
mobile_data.technology, mobile_data.order_id, "mobile"
|
|
51
|
+
mobile_data.technology, mobile_data.order_id, "mobile"
|
|
53
52
|
)
|
|
54
53
|
mock_mobile_article.call.assert_called_once()
|
|
55
54
|
|
|
@@ -38,7 +38,7 @@ class Router4GTicketTestCase(unittest.TestCase):
|
|
|
38
38
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.ProvisionArticle")
|
|
39
39
|
def test_build_article(self, MockInternetArticle):
|
|
40
40
|
customer_data = Mock(spec=[])
|
|
41
|
-
service_data = Mock(spec=["order_id", "
|
|
41
|
+
service_data = Mock(spec=["order_id", "technology"])
|
|
42
42
|
|
|
43
43
|
mock_internet_article = MockInternetArticle.return_value
|
|
44
44
|
|
|
@@ -47,7 +47,7 @@ class Router4GTicketTestCase(unittest.TestCase):
|
|
|
47
47
|
)._build_article()
|
|
48
48
|
|
|
49
49
|
MockInternetArticle.assert_called_with(
|
|
50
|
-
service_data.technology, service_data.order_id, "4G"
|
|
50
|
+
service_data.technology, service_data.order_id, "4G"
|
|
51
51
|
)
|
|
52
52
|
mock_internet_article.call.assert_called_once()
|
|
53
53
|
|
|
@@ -45,6 +45,7 @@ class SwitchboardDynamicFieldsTestCase(unittest.TestCase):
|
|
|
45
45
|
shipment_subdivision=faker.state(),
|
|
46
46
|
additional_products="A,B,C",
|
|
47
47
|
confirmed_documentation=faker.boolean(),
|
|
48
|
+
notes=faker.word(),
|
|
48
49
|
)
|
|
49
50
|
|
|
50
51
|
self.switchboard_otrs_process_id = faker.uuid4()
|
|
@@ -181,3 +182,9 @@ class SwitchboardDynamicFieldsTestCase(unittest.TestCase):
|
|
|
181
182
|
self.dynamic_fields_dct["confirmarDocumentacio"],
|
|
182
183
|
"1" if self.service_data.confirmed_documentation else "0",
|
|
183
184
|
)
|
|
185
|
+
|
|
186
|
+
def test_consideracions_generals_field(self):
|
|
187
|
+
self.assertEqual(
|
|
188
|
+
self.dynamic_fields_dct["consideracionsGenerals"],
|
|
189
|
+
self.service_data.notes,
|
|
190
|
+
)
|
|
@@ -42,9 +42,8 @@ class SwitchboardHeaderTicketTestCase(unittest.TestCase):
|
|
|
42
42
|
|
|
43
43
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.ProvisionArticle")
|
|
44
44
|
def test_build_article(self, MockProvisionArticle):
|
|
45
|
-
service_data = Mock(spec=["order_id", "
|
|
45
|
+
service_data = Mock(spec=["order_id", "technology"])
|
|
46
46
|
service_data.order_id = 123
|
|
47
|
-
service_data.notes = "Notes test"
|
|
48
47
|
customer_data = Mock(spec=["order_id"])
|
|
49
48
|
|
|
50
49
|
mock_article = MockProvisionArticle.return_value
|
|
@@ -57,7 +56,6 @@ class SwitchboardHeaderTicketTestCase(unittest.TestCase):
|
|
|
57
56
|
service_data.technology,
|
|
58
57
|
service_data.order_id,
|
|
59
58
|
"switchboard_header",
|
|
60
|
-
service_data.notes,
|
|
61
59
|
)
|
|
62
60
|
mock_article.call.assert_called_once()
|
|
63
61
|
|
|
@@ -40,9 +40,8 @@ class SwitchboardTicketTestCase(unittest.TestCase):
|
|
|
40
40
|
|
|
41
41
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.ProvisionArticle")
|
|
42
42
|
def test_build_article(self, MockProvisionArticle):
|
|
43
|
-
service_data = Mock(spec=["order_id", "
|
|
43
|
+
service_data = Mock(spec=["order_id", "technology"])
|
|
44
44
|
service_data.order_id = 123
|
|
45
|
-
service_data.notes = "Notes test"
|
|
46
45
|
customer_data = Mock(spec=["order_id"])
|
|
47
46
|
|
|
48
47
|
mock_article = MockProvisionArticle.return_value
|
|
@@ -54,7 +53,6 @@ class SwitchboardTicketTestCase(unittest.TestCase):
|
|
|
54
53
|
service_data.technology,
|
|
55
54
|
service_data.order_id,
|
|
56
55
|
"switchboard",
|
|
57
|
-
service_data.notes,
|
|
58
56
|
)
|
|
59
57
|
mock_article.call.assert_called_once()
|
|
60
58
|
|
|
File without changes
|
|
File without changes
|