firefighter-incident 0.0.17__py3-none-any.whl → 0.0.18__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.
- firefighter/_version.py +2 -2
- firefighter/raid/serializers.py +17 -0
- {firefighter_incident-0.0.17.dist-info → firefighter_incident-0.0.18.dist-info}/METADATA +1 -1
- {firefighter_incident-0.0.17.dist-info → firefighter_incident-0.0.18.dist-info}/RECORD +8 -8
- firefighter_tests/test_api/test_api_landbot.py +38 -0
- {firefighter_incident-0.0.17.dist-info → firefighter_incident-0.0.18.dist-info}/WHEEL +0 -0
- {firefighter_incident-0.0.17.dist-info → firefighter_incident-0.0.18.dist-info}/entry_points.txt +0 -0
- {firefighter_incident-0.0.17.dist-info → firefighter_incident-0.0.18.dist-info}/licenses/LICENSE +0 -0
firefighter/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 0,
|
|
31
|
+
__version__ = version = '0.0.18'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 0, 18)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
firefighter/raid/serializers.py
CHANGED
|
@@ -98,6 +98,13 @@ class LandbotIssueRequestSerializer(serializers.ModelSerializer[JiraTicket]):
|
|
|
98
98
|
allow_null=True,
|
|
99
99
|
allow_blank=True,
|
|
100
100
|
)
|
|
101
|
+
zendesk = serializers.CharField(
|
|
102
|
+
max_length=256,
|
|
103
|
+
write_only=True,
|
|
104
|
+
allow_null=True,
|
|
105
|
+
allow_blank=True,
|
|
106
|
+
required=False,
|
|
107
|
+
)
|
|
101
108
|
platform = serializers.ChoiceField(
|
|
102
109
|
write_only=True, choices=["ES", "IT", "FR", "UK", "DE", "All", "Internal"]
|
|
103
110
|
)
|
|
@@ -106,6 +113,8 @@ class LandbotIssueRequestSerializer(serializers.ModelSerializer[JiraTicket]):
|
|
|
106
113
|
labels = serializers.ListField(
|
|
107
114
|
required=False,
|
|
108
115
|
write_only=True,
|
|
116
|
+
allow_null=True,
|
|
117
|
+
default=list,
|
|
109
118
|
child=serializers.CharField(
|
|
110
119
|
max_length=128,
|
|
111
120
|
allow_blank=False,
|
|
@@ -165,6 +174,12 @@ class LandbotIssueRequestSerializer(serializers.ModelSerializer[JiraTicket]):
|
|
|
165
174
|
],
|
|
166
175
|
)
|
|
167
176
|
|
|
177
|
+
def validate_labels(self, value: list[str] | None) -> list[str]:
|
|
178
|
+
"""Transform null labels to empty list."""
|
|
179
|
+
if value is None:
|
|
180
|
+
return []
|
|
181
|
+
return value
|
|
182
|
+
|
|
168
183
|
def validate_environments(self, value: list[str] | None) -> list[str] | Any:
|
|
169
184
|
if not value:
|
|
170
185
|
return self.fields["environments"].default
|
|
@@ -198,6 +213,7 @@ class LandbotIssueRequestSerializer(serializers.ModelSerializer[JiraTicket]):
|
|
|
198
213
|
priority=validated_data["priority"],
|
|
199
214
|
seller_contract_id=validated_data["seller_contract_id"],
|
|
200
215
|
zoho_desk_ticket_id=validated_data["zoho"],
|
|
216
|
+
zendesk_ticket_id=validated_data.get("zendesk"),
|
|
201
217
|
platform=validated_data["platform"],
|
|
202
218
|
incident_category=validated_data["incident_category"],
|
|
203
219
|
business_impact=validated_data["business_impact"],
|
|
@@ -238,6 +254,7 @@ class LandbotIssueRequestSerializer(serializers.ModelSerializer[JiraTicket]):
|
|
|
238
254
|
"description",
|
|
239
255
|
"seller_contract_id",
|
|
240
256
|
"zoho",
|
|
257
|
+
"zendesk",
|
|
241
258
|
"platform",
|
|
242
259
|
"reporter_email",
|
|
243
260
|
"incident_category",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: firefighter-incident
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.18
|
|
4
4
|
Summary: Incident Management tool made for Slack using Django
|
|
5
5
|
Project-URL: Repository, https://github.com/ManoManoTech/firefighter-incident
|
|
6
6
|
Project-URL: Documentation, https://manomanotech.github.io/firefighter-incident/latest/
|
|
@@ -6,7 +6,7 @@ gunicorn.conf.py,sha256=vHsTGjaKOr8FDMp6fTKYTX4AtokmPgYvvt5Mr0Q6APc,273
|
|
|
6
6
|
main.py,sha256=CsbprHoOYhjCLpTJmq9Z_aRYFoFgWxoz2pDLuwm8Eqg,1558
|
|
7
7
|
manage.py,sha256=5ivHGD13C6nJ8QvltKsJ9T9akA5he8da70HLWaEP3k8,689
|
|
8
8
|
firefighter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
firefighter/_version.py,sha256=
|
|
9
|
+
firefighter/_version.py,sha256=tzG3REjXftgEO32YP2rgLirgULNff34B-C5Yb8oweEc,706
|
|
10
10
|
firefighter/api/__init__.py,sha256=JQW0Bv6xwGqy7ioxx3h6UGMzkkJ4DntDpbvV1Ncgi8k,136
|
|
11
11
|
firefighter/api/admin.py,sha256=x9Ysy-GiYjb0rynmFdS9g56e6n24fkN0ouGy5QD9Yrc,4629
|
|
12
12
|
firefighter/api/apps.py,sha256=P5uU1_gMrDfzurdMbfqw1Bnb2uNKKcMq17WBPg2sLhc,204
|
|
@@ -316,7 +316,7 @@ firefighter/raid/forms.py,sha256=gbbXDizCYDs8vz33ZFClTVZ_yM3jqZtWFMYRy3K3xuM,118
|
|
|
316
316
|
firefighter/raid/messages.py,sha256=e75kwi0hCe5ChwU4t-_6Q3Rcy22MLLdVSsYyjvG2SCM,5542
|
|
317
317
|
firefighter/raid/models.py,sha256=29Smci739K1ZdcMu7uXYvoVEhgDpwLQoCzBbc5wvwhs,2211
|
|
318
318
|
firefighter/raid/resources.py,sha256=39GhITs3OAWA1eSPZme-rLd818kuz7gwYzdN38zNz8Y,436
|
|
319
|
-
firefighter/raid/serializers.py,sha256=
|
|
319
|
+
firefighter/raid/serializers.py,sha256=hJspJBTPvIs3Y_zpXSwui0aGt4cyIxrwFHwhpT-G58k,11967
|
|
320
320
|
firefighter/raid/service.py,sha256=rxRjEpA5wg4JRe4UrGW-y8C8quHvGlJzQ0U8rdy-DyM,8490
|
|
321
321
|
firefighter/raid/types.py,sha256=0lFy_Wl3Ekyy_sxTHPRxMn3kjEJVWCTPjmefDlrPqMQ,438
|
|
322
322
|
firefighter/raid/urls.py,sha256=oESkDY2tfZcnPGUgULqixvbV3Z7YsZfeI10RX3A5tZY,924
|
|
@@ -438,7 +438,7 @@ firefighter_fixtures/incidents/priorities.json,sha256=ZPqfC2GD7vgLBnGNxVcDpjxCLt
|
|
|
438
438
|
firefighter_fixtures/incidents/severities.json,sha256=hsaG3TT0oaRVvZVaeU6BJGddFn_gewJ4E7Lk7ufII6U,2467
|
|
439
439
|
firefighter_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
440
440
|
firefighter_tests/conftest.py,sha256=fyVZNk4PX0ATjIjmq0BYjC9k3og26kkpC73npEgFlv8,3228
|
|
441
|
-
firefighter_tests/test_api/test_api_landbot.py,sha256=
|
|
441
|
+
firefighter_tests/test_api/test_api_landbot.py,sha256=a5Fk-8GCLCdwqJOovFzw75uDq6pn6sKIcTRHpbMzx_M,4602
|
|
442
442
|
firefighter_tests/test_api/test_api_urls.py,sha256=Nn7Flq7dWGYJjgZK5HGdGECFMwKiDdfDYI0g09gXK-c,1936
|
|
443
443
|
firefighter_tests/test_confluence/test_confluence_utils.py,sha256=hD5M4mYwrHlil9KPARNQ5OINdRc5njfYCIdq8a6jUB8,1847
|
|
444
444
|
firefighter_tests/test_firefighter/test_firefighter_utils.py,sha256=og79bkErCBQB-xkw88J-ronT0dDEChuqlMke2ElxATo,3590
|
|
@@ -493,8 +493,8 @@ firefighter_tests/test_slack/views/modals/test_send_sos.py,sha256=_rE6jD-gOzcGyh
|
|
|
493
493
|
firefighter_tests/test_slack/views/modals/test_status.py,sha256=oQzPfwdg2tkbo9nfkO1GfS3WydxqSC6vy1AZjZDKT30,2226
|
|
494
494
|
firefighter_tests/test_slack/views/modals/test_update_status.py,sha256=aqLQ_9TV4Zn-S2sSXL8VNqTMygcbgOIrxg4OUovgUrw,55630
|
|
495
495
|
firefighter_tests/test_slack/views/modals/test_utils.py,sha256=DJd2n9q6fFu8UuCRdiq9U_Cn19MdnC5c-ydLLrk6rkc,5218
|
|
496
|
-
firefighter_incident-0.0.
|
|
497
|
-
firefighter_incident-0.0.
|
|
498
|
-
firefighter_incident-0.0.
|
|
499
|
-
firefighter_incident-0.0.
|
|
500
|
-
firefighter_incident-0.0.
|
|
496
|
+
firefighter_incident-0.0.18.dist-info/METADATA,sha256=IoKMnbPTxFmn7Cfb2UIV6x77XIp1pY6WSrOhW2JxsFg,5541
|
|
497
|
+
firefighter_incident-0.0.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
498
|
+
firefighter_incident-0.0.18.dist-info/entry_points.txt,sha256=c13meJbv7YNmYz7MipMOQwzQ5IeFOPXUBYAJ44XMQsM,61
|
|
499
|
+
firefighter_incident-0.0.18.dist-info/licenses/LICENSE,sha256=krRiGp-a9-1nH1bWpBEdxyTKLhjLmn6DMVVoIb0zF90,1087
|
|
500
|
+
firefighter_incident-0.0.18.dist-info/RECORD,,
|
|
@@ -13,6 +13,7 @@ base_valid_data = {
|
|
|
13
13
|
"description": "Test description",
|
|
14
14
|
"seller_contract_id": "123456",
|
|
15
15
|
"zoho": "https://test_url.com",
|
|
16
|
+
"zendesk": "12345",
|
|
16
17
|
"platform": "FR",
|
|
17
18
|
"reporter_email": "test_email@example.com",
|
|
18
19
|
"incident_category": "Test Area",
|
|
@@ -56,6 +57,20 @@ def test_valid_data_no_labels() -> None:
|
|
|
56
57
|
|
|
57
58
|
# When & Then
|
|
58
59
|
assert serializer.is_valid()
|
|
60
|
+
assert serializer.validated_data["labels"] == []
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_valid_data_labels_null() -> None:
|
|
64
|
+
# Given - labels is explicitly null in payload
|
|
65
|
+
valid_data = {
|
|
66
|
+
**base_valid_data,
|
|
67
|
+
"labels": None,
|
|
68
|
+
}
|
|
69
|
+
serializer = LandbotIssueRequestSerializer(data=valid_data)
|
|
70
|
+
|
|
71
|
+
# When & Then
|
|
72
|
+
assert serializer.is_valid()
|
|
73
|
+
assert serializer.validated_data["labels"] == [] # null transformed to empty list
|
|
59
74
|
|
|
60
75
|
|
|
61
76
|
def test_valid_data_no_environments() -> None:
|
|
@@ -97,6 +112,29 @@ def test_invalid_data_label_too_long() -> None:
|
|
|
97
112
|
assert "labels" in serializer.errors
|
|
98
113
|
|
|
99
114
|
|
|
115
|
+
def test_valid_data_with_zendesk() -> None:
|
|
116
|
+
# Given
|
|
117
|
+
valid_data = {
|
|
118
|
+
**base_valid_data,
|
|
119
|
+
"zendesk": "ZD-98765",
|
|
120
|
+
}
|
|
121
|
+
serializer = LandbotIssueRequestSerializer(data=valid_data)
|
|
122
|
+
|
|
123
|
+
# When & Then
|
|
124
|
+
assert serializer.is_valid()
|
|
125
|
+
assert serializer.validated_data["zendesk"] == "ZD-98765"
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def test_valid_data_without_zendesk() -> None:
|
|
129
|
+
# Given
|
|
130
|
+
valid_data = {**base_valid_data}
|
|
131
|
+
del valid_data["zendesk"]
|
|
132
|
+
serializer = LandbotIssueRequestSerializer(data=valid_data)
|
|
133
|
+
|
|
134
|
+
# When & Then
|
|
135
|
+
assert serializer.is_valid()
|
|
136
|
+
|
|
137
|
+
|
|
100
138
|
def test_ignore_empty_string_list_field() -> None:
|
|
101
139
|
serializer_field = IgnoreEmptyStringListField()
|
|
102
140
|
|
|
File without changes
|
{firefighter_incident-0.0.17.dist-info → firefighter_incident-0.0.18.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{firefighter_incident-0.0.17.dist-info → firefighter_incident-0.0.18.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|