otrs-somconnexio 0.7.0__py2.py3-none-any.whl → 0.7.1__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/provision_ticket.py +4 -1
- otrs_somconnexio/otrs_models/ticket_factory.py +1 -1
- {otrs_somconnexio-0.7.0.dist-info → otrs_somconnexio-0.7.1.dist-info}/METADATA +1 -1
- {otrs_somconnexio-0.7.0.dist-info → otrs_somconnexio-0.7.1.dist-info}/RECORD +8 -8
- tests/otrs_models/test_adsl_ticket.py +5 -10
- tests/otrs_models/test_ticket_factory.py +12 -0
- {otrs_somconnexio-0.7.0.dist-info → otrs_somconnexio-0.7.1.dist-info}/WHEEL +0 -0
- {otrs_somconnexio-0.7.0.dist-info → otrs_somconnexio-0.7.1.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@ class TicketFactory(object):
|
|
|
14
14
|
the service of the EticomContract.
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
|
-
def __init__(self, service_data, customer_data, responsible_data):
|
|
17
|
+
def __init__(self, service_data, customer_data, responsible_data=None):
|
|
18
18
|
self.service_data = service_data
|
|
19
19
|
self.customer_data = customer_data
|
|
20
20
|
self.responsible_data = responsible_data
|
|
@@ -21,7 +21,7 @@ otrs_somconnexio/otrs_models/mobile_ticket.py,sha256=aNtGteRzD-dOtPqqs3KoqggZaeL
|
|
|
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
23
|
otrs_somconnexio/otrs_models/provision_dynamic_fields.py,sha256=UcMAj1UKSr71ENoBO7UGLdU7Q_6o7hbT6PeNiP7vvis,3989
|
|
24
|
-
otrs_somconnexio/otrs_models/provision_ticket.py,sha256=
|
|
24
|
+
otrs_somconnexio/otrs_models/provision_ticket.py,sha256=ANlfVsJyvR4iPDM1B8g7J6AOlwOTJ58BG2-18-63sIw,2772
|
|
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
|
|
@@ -34,7 +34,7 @@ otrs_somconnexio/otrs_models/switchboard_header_dynamic_fields.py,sha256=WsVBchl
|
|
|
34
34
|
otrs_somconnexio/otrs_models/switchboard_header_ticket.py,sha256=nI0icSuhOPYEEI7gn0YEYJJT6H1TfCnl1W3gm3MCDww,982
|
|
35
35
|
otrs_somconnexio/otrs_models/switchboard_ticket.py,sha256=O5xONkHBiRHIi6OYNHCl00-AXxRNl3hT1pmDqGoJsgg,944
|
|
36
36
|
otrs_somconnexio/otrs_models/telecom_company.py,sha256=yh8wIE7-AjWESdFsE479WWZ-3uFz_ljUBKF8GK44oow,3077
|
|
37
|
-
otrs_somconnexio/otrs_models/ticket_factory.py,sha256=
|
|
37
|
+
otrs_somconnexio/otrs_models/ticket_factory.py,sha256=QL2u-51EuXy1aJWZxUZMo4JisDoKBAQM83GViXJAPx8,2215
|
|
38
38
|
otrs_somconnexio/otrs_models/vf_provisioning_article.py,sha256=AZbtXePA-FA3ufHJsngaXzUL4npJgUqMqvrMSUmCd9o,599
|
|
39
39
|
otrs_somconnexio/otrs_models/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
otrs_somconnexio/otrs_models/configurations/changes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -123,7 +123,7 @@ 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=j1uvZ3rJscf4qfO2vm1Vk4IFIuHvXzMQOJhMM020oV4,4547
|
|
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
|
|
@@ -146,7 +146,7 @@ tests/otrs_models/test_switchboard_header_dynamic_fields.py,sha256=2xaVzEC9-6NZ9
|
|
|
146
146
|
tests/otrs_models/test_switchboard_header_ticket.py,sha256=J5GFBgNVG8k0MU8AxvQNj-J3QNAe8CS6B8rsC0uepGk,4651
|
|
147
147
|
tests/otrs_models/test_switchboard_ticket.py,sha256=SJNYlVqr9oIywNiMH-TwtK9BRB1iuM4VpfmqvvmqZsw,4973
|
|
148
148
|
tests/otrs_models/test_telecom_company.py,sha256=nC4uBleU2Lr3qHr5VDo-6kbcTVwKgguC85TcbhTOn1c,1450
|
|
149
|
-
tests/otrs_models/test_ticket_factory.py,sha256=
|
|
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
|
|
151
151
|
tests/otrs_models/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
152
152
|
tests/otrs_models/configuration/changes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -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.1.dist-info/METADATA,sha256=2u54KWVBGnJ7IuG9O1aMU33aH7gbGjbP2XDQ8tXjMeQ,3458
|
|
200
|
+
otrs_somconnexio-0.7.1.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
201
|
+
otrs_somconnexio-0.7.1.dist-info/top_level.txt,sha256=gvMaHGNwusWpSIy-PVyb0CKDIA4-4fXmEVER_2a-OnE,23
|
|
202
|
+
otrs_somconnexio-0.7.1.dist-info/RECORD,,
|
|
@@ -9,8 +9,6 @@ from otrs_somconnexio.otrs_models.configurations.provision.adsl_ticket import (
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class ADSLTicketTestCase(unittest.TestCase):
|
|
12
|
-
def setUp(self):
|
|
13
|
-
self.responsible_data = Mock(spec=["email"])
|
|
14
12
|
|
|
15
13
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.Ticket")
|
|
16
14
|
def test_build_ticket(self, MockTicket):
|
|
@@ -26,10 +24,10 @@ class ADSLTicketTestCase(unittest.TestCase):
|
|
|
26
24
|
"Priority": ADSLTicketConfiguration.priority,
|
|
27
25
|
"CustomerUser": customer_data.id,
|
|
28
26
|
"CustomerID": customer_data.id,
|
|
29
|
-
"Responsible":
|
|
27
|
+
"Responsible": False,
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
ADSLTicket(service_data, customer_data,
|
|
30
|
+
ADSLTicket(service_data, customer_data, None)._build_ticket()
|
|
33
31
|
MockTicket.assert_called_with(expected_ticket_arguments)
|
|
34
32
|
|
|
35
33
|
@patch("otrs_somconnexio.otrs_models.provision_ticket.ProvisionArticle")
|
|
@@ -39,7 +37,7 @@ class ADSLTicketTestCase(unittest.TestCase):
|
|
|
39
37
|
|
|
40
38
|
mock_mobile_article = MockInternetArticle.return_value
|
|
41
39
|
|
|
42
|
-
ADSLTicket(service_data, customer_data,
|
|
40
|
+
ADSLTicket(service_data, customer_data, None)._build_article()
|
|
43
41
|
|
|
44
42
|
MockInternetArticle.assert_called_with(
|
|
45
43
|
service_data.technology, service_data.order_id, "adsl", service_data.notes
|
|
@@ -53,9 +51,7 @@ class ADSLTicketTestCase(unittest.TestCase):
|
|
|
53
51
|
|
|
54
52
|
mock_adsl_dynamic_fields = MockADSLDynamicFields.return_value
|
|
55
53
|
|
|
56
|
-
ADSLTicket(
|
|
57
|
-
service_data, customer_data, self.responsible_data
|
|
58
|
-
)._build_dynamic_fields()
|
|
54
|
+
ADSLTicket(service_data, customer_data, None)._build_dynamic_fields()
|
|
59
55
|
|
|
60
56
|
MockADSLDynamicFields.assert_called_with(
|
|
61
57
|
service_data,
|
|
@@ -115,14 +111,13 @@ class ADSLTicketTestCase(unittest.TestCase):
|
|
|
115
111
|
"confirmed_documentation",
|
|
116
112
|
]
|
|
117
113
|
)
|
|
118
|
-
self.responsible_data = Mock(spec=["email"])
|
|
119
114
|
|
|
120
115
|
mock_otrs_client = Mock(spec=["create_otrs_process_ticket"])
|
|
121
116
|
mock_otrs_client.create_otrs_process_ticket.return_value.id = 123
|
|
122
117
|
mock_otrs_client.create_otrs_process_ticket.return_value.number = "#123"
|
|
123
118
|
MockOTRSClient.return_value = mock_otrs_client
|
|
124
119
|
|
|
125
|
-
ticket = ADSLTicket(service_data, customer_data,
|
|
120
|
+
ticket = ADSLTicket(service_data, customer_data, None)
|
|
126
121
|
ticket.create()
|
|
127
122
|
|
|
128
123
|
mock_otrs_client.create_otrs_process_ticket.assert_called_once()
|
|
@@ -88,6 +88,18 @@ class TicketFactoryTestCase(unittest.TestCase):
|
|
|
88
88
|
responsible_data=self.responsible_data,
|
|
89
89
|
)
|
|
90
90
|
|
|
91
|
+
@patch("otrs_somconnexio.otrs_models.ticket_factory.FiberTicket")
|
|
92
|
+
def test_build_fibre_ticket_without_responsible(self, MockFiberTicket):
|
|
93
|
+
self.service_data.service_type = "fiber"
|
|
94
|
+
|
|
95
|
+
TicketFactory(self.service_data, self.customer_data).build()
|
|
96
|
+
|
|
97
|
+
MockFiberTicket.assert_called_once_with(
|
|
98
|
+
service_data=self.service_data,
|
|
99
|
+
customer_data=self.customer_data,
|
|
100
|
+
responsible_data=None,
|
|
101
|
+
)
|
|
102
|
+
|
|
91
103
|
def test_build_service_not_allowed_error(self):
|
|
92
104
|
self.service_data.service_type = ""
|
|
93
105
|
|
|
File without changes
|
|
File without changes
|