aa-structures 2.7.1__py3-none-any.whl → 2.8.0__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.
- {aa_structures-2.7.1.dist-info → aa_structures-2.8.0.dist-info}/METADATA +2 -1
- {aa_structures-2.7.1.dist-info → aa_structures-2.8.0.dist-info}/RECORD +12 -12
- structures/__init__.py +1 -1
- structures/models/notifications.py +2 -0
- structures/tests/models/test_notifications_1.py +2 -1
- structures/tests/models/test_notifications_2.py +2 -1
- structures/tests/test_admin.py +12 -6
- structures/tests/test_tasks.py +2 -1
- structures/webhooks/models.py +1 -0
- structures/webhooks/tests/test_core.py +4 -2
- {aa_structures-2.7.1.dist-info → aa_structures-2.8.0.dist-info}/LICENSE +0 -0
- {aa_structures-2.7.1.dist-info → aa_structures-2.8.0.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: aa-structures
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.8.0
|
4
4
|
Summary: App for managing Eve Online structures with Alliance Auth.
|
5
5
|
Author-email: Erik Kalkoken <kalkoken87@gmail.com>
|
6
6
|
Requires-Python: >=3.8
|
@@ -8,6 +8,7 @@ Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: Environment :: Web Environment
|
9
9
|
Classifier: Framework :: Django
|
10
10
|
Classifier: Framework :: Django :: 4.0
|
11
|
+
Classifier: Framework :: Django :: 4.2
|
11
12
|
Classifier: Intended Audience :: End Users/Desktop
|
12
13
|
Classifier: License :: OSI Approved :: MIT License
|
13
14
|
Classifier: Operating System :: OS Independent
|
@@ -1,4 +1,4 @@
|
|
1
|
-
structures/__init__.py,sha256=
|
1
|
+
structures/__init__.py,sha256=PFHURRAAwRO2isL71Yh4tt5zh27lozWI4fTy0d3LUYI,203
|
2
2
|
structures/admin.py,sha256=2i08sj8vIOaSWq3sT_lHJi9YpWKtMtrL4Pg2V-Ly7OM,38634
|
3
3
|
structures/app_settings.py,sha256=nNERL_qmuaa8EkzvT3rzVD8KhKeajS0fRaTPK4suArM,6267
|
4
4
|
structures/apps.py,sha256=MNZH9l3qWCwuS7OGiKGkBVrDzKoOFlqwDdEgyEFzxVA,195
|
@@ -59,7 +59,7 @@ structures/migrations/0004_improve_localization.py,sha256=R29j2Ki9I_yOvEQTxEu_zM
|
|
59
59
|
structures/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
60
|
structures/models/__init__.py,sha256=Da0-Z4BtsZ_mlnI6XtyvoE0UtTuOA0psGCuVhVPVKrM,916
|
61
61
|
structures/models/eveuniverse.py,sha256=CifvydjKeci7bS20RYdkcn-J9YUUdrUwt6tI4EvPln4,2214
|
62
|
-
structures/models/notifications.py,sha256=
|
62
|
+
structures/models/notifications.py,sha256=3pwkZXW_tMalcanSzJWKsR3R-FhDCZasEqnC_TSNUMA,35169
|
63
63
|
structures/models/owners.py,sha256=ryePMT-91krq2XLxIINFFGNhCj4vef-zyrwzwF26Pjw,53885
|
64
64
|
structures/models/structures_1.py,sha256=e1sI-2zMSKcPi2PyYA--fcc8rn-yQwODzlUHKjeWgLI,29778
|
65
65
|
structures/models/structures_2.py,sha256=g5Pct5jNmZC-n7fnpLs5UyiP9JLrGdI1vjYucHTV_wQ,10371
|
@@ -155,11 +155,11 @@ structures/templates/structures/templatetags/list_title.html,sha256=C2NWwo27TGfG
|
|
155
155
|
structures/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
156
156
|
structures/templatetags/structures.py,sha256=vSt5AnfYuo11q1SxiskT4oshSMsZ9ZgM0nYpYiMl8bA,1637
|
157
157
|
structures/tests/__init__.py,sha256=9MrJzKr8DdsQY3-79v188pTpwqT4TDQ46vKnBJAGqic,75
|
158
|
-
structures/tests/test_admin.py,sha256=
|
158
|
+
structures/tests/test_admin.py,sha256=_kV4giMVn-Pp77er0V5Pu10eBBohzT_oEdnl6D6q5bM,24333
|
159
159
|
structures/tests/test_helpers.py,sha256=vYjUXWFcFzavbiRzQgq0Tcvix7AuCoe-BxVVS-BToM8,4291
|
160
160
|
structures/tests/test_managers_1.py,sha256=mCOZLGLhHWPIEObdy194_VgkB6pdshhu4SNOPeYFwOM,34339
|
161
161
|
structures/tests/test_managers_2.py,sha256=2jAkjVBu4CA7irFRp3oqPJneJbMON1ixznS4wZXGOTk,2916
|
162
|
-
structures/tests/test_tasks.py,sha256=
|
162
|
+
structures/tests/test_tasks.py,sha256=1gGG9Nm4ofV4YBjjgt7OT35vuh1vU9ri24NaBul5lqY,17113
|
163
163
|
structures/tests/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
164
|
structures/tests/core/test_notification_structuretimers.py,sha256=ByE9pH2MuuEr-RcelzqCsvHqGxFWsCDng1fGx2NMb4Y,10827
|
165
165
|
structures/tests/core/test_notification_types.py,sha256=WNJGXoxO3LbgxPgCH416IJElREWFBtwx5pw8IulsmYo,9881
|
@@ -175,8 +175,8 @@ structures/tests/integration/test_tasks.py,sha256=6CxJ0lmRWr_Li-8egLrZp1hvlB6k6m
|
|
175
175
|
structures/tests/integration/test_views.py,sha256=2X_Hg5zJVYI0IZGwgsi-2QzjNlBn30pI51vvifmEYEI,4253
|
176
176
|
structures/tests/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
177
177
|
structures/tests/models/test_eveuniverse.py,sha256=kAWiNtWfalrrx_vz_hcDls1wtNHYrGYkctilu2Nw9ck,1597
|
178
|
-
structures/tests/models/test_notifications_1.py,sha256=
|
179
|
-
structures/tests/models/test_notifications_2.py,sha256=
|
178
|
+
structures/tests/models/test_notifications_1.py,sha256=j1k-r23XPhFR5UxWpXCphGFKOOip74hZvvCjukNHcMQ,30498
|
179
|
+
structures/tests/models/test_notifications_2.py,sha256=tgkcxKmmomDs3gE7jzEdt_w9wS-Sz0QkH6b1CiSQTZA,31937
|
180
180
|
structures/tests/models/test_notifications_3.py,sha256=WaJKtlfV05-djV8F-R44jWRFu1dpT3hP9rIEpQ_gNO0,7179
|
181
181
|
structures/tests/models/test_notifications_discord.py,sha256=XUCrgPQATEHEo2BicbioRdBNT6VoibLcK1U9CoRK3yI,5521
|
182
182
|
structures/tests/models/test_owners_1.py,sha256=dOnsxXbRQeExOtGY5jbNVvT7QBdKZh3YWFxwE3VXieU,21692
|
@@ -211,11 +211,11 @@ structures/views/structures.py,sha256=XtQxYySOPqO9klPgF1o57pCejuo22EdU00h5LAdEVM
|
|
211
211
|
structures/webhooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
212
212
|
structures/webhooks/core.py,sha256=mP25MbQG8Yv2YayDFcR6x2V30eqXhR2q5u4SRefblf4,6573
|
213
213
|
structures/webhooks/managers.py,sha256=L3G3AmsyDeif_lfpWshmAxQ61UGJ9w8i9lZaF2jbOtQ,1117
|
214
|
-
structures/webhooks/models.py,sha256=
|
214
|
+
structures/webhooks/models.py,sha256=kUkt9rnRQIJIrU9Bjcs34rvkb-TMbUubHdn-kny08kI,2067
|
215
215
|
structures/webhooks/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
216
|
-
structures/webhooks/tests/test_core.py,sha256=
|
216
|
+
structures/webhooks/tests/test_core.py,sha256=4NcEAQgK2KhQkFOxYh2ad0S-qUWh1DNGDmLo5Mo5opI,6762
|
217
217
|
structures/webhooks/tests/test_utils.py,sha256=ekADFv0JOEtXeqdiejbeqrABO__Q1flJHzVieQ7L9e0,459
|
218
|
-
aa_structures-2.
|
219
|
-
aa_structures-2.
|
220
|
-
aa_structures-2.
|
221
|
-
aa_structures-2.
|
218
|
+
aa_structures-2.8.0.dist-info/LICENSE,sha256=XZiwB_S_40_HhnvLg5xvtBb3g1oGjPrk0rpFwk8iInE,1070
|
219
|
+
aa_structures-2.8.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
220
|
+
aa_structures-2.8.0.dist-info/METADATA,sha256=gk_3PCb8cSvayCxZpRb8R0J78-88_w2EKNCvQq0Qv7g,5970
|
221
|
+
aa_structures-2.8.0.dist-info/RECORD,,
|
structures/__init__.py
CHANGED
@@ -8,6 +8,7 @@ from typing import Optional, Tuple, Union
|
|
8
8
|
import dhooks_lite
|
9
9
|
import yaml
|
10
10
|
from multiselectfield import MultiSelectField
|
11
|
+
from multiselectfield.utils import get_max_length
|
11
12
|
from requests.exceptions import HTTPError
|
12
13
|
|
13
14
|
from django.contrib.auth.models import Group
|
@@ -67,6 +68,7 @@ class Webhook(WebhookBase):
|
|
67
68
|
|
68
69
|
notification_types = MultiSelectField(
|
69
70
|
choices=NotificationType.choices,
|
71
|
+
max_length=get_max_length(NotificationType.choices, None),
|
70
72
|
default=NotificationType.webhook_defaults(),
|
71
73
|
verbose_name=_("notification types"),
|
72
74
|
help_text=_(
|
@@ -592,7 +592,8 @@ class TestNotificationSendToWebhook(NoSocketsTestCase):
|
|
592
592
|
@patch(MODULE_PATH + ".Webhook.send_message", spec=True)
|
593
593
|
class TestNotificationSendMessage(NoSocketsTestCase):
|
594
594
|
@classmethod
|
595
|
-
def
|
595
|
+
def setUpClass(cls): # Can not be setUpTestData due to conflict with redis client
|
596
|
+
super().setUpClass()
|
596
597
|
load_eveuniverse()
|
597
598
|
load_eve_entities()
|
598
599
|
cls.owner = OwnerFactory(is_alliance_main=True)
|
@@ -33,7 +33,8 @@ MODULE_PATH = "structures.models.notifications"
|
|
33
33
|
@patch(MODULE_PATH + ".Webhook.send_message", spec=True)
|
34
34
|
class TestStructureFuelAlerts(NoSocketsTestCase):
|
35
35
|
@classmethod
|
36
|
-
def
|
36
|
+
def setUpClass(cls): # Can not be setUpTestData due to conflict with redis client
|
37
|
+
super().setUpClass()
|
37
38
|
load_eveuniverse()
|
38
39
|
load_eve_entities()
|
39
40
|
cls.owner = OwnerFactory()
|
structures/tests/test_admin.py
CHANGED
@@ -52,7 +52,8 @@ class MockRequest(object):
|
|
52
52
|
|
53
53
|
class TestFuelNotificationConfigAdminView(TestCase):
|
54
54
|
@classmethod
|
55
|
-
def
|
55
|
+
def setUpClass(cls):
|
56
|
+
super().setUpClass()
|
56
57
|
cls.defaults = {
|
57
58
|
"is_enabled": True,
|
58
59
|
"channel_ping_type": Webhook.PingType.HERE,
|
@@ -213,7 +214,8 @@ class TestFuelNotificationConfigAdminView(TestCase):
|
|
213
214
|
|
214
215
|
class TestStructureFuelAlertAdmin(TestCase):
|
215
216
|
@classmethod
|
216
|
-
def
|
217
|
+
def setUpClass(cls):
|
218
|
+
super().setUpClass()
|
217
219
|
cls.modeladmin = StructureFuelAlertConfigAdmin(
|
218
220
|
model=FuelAlertConfig, admin_site=AdminSite()
|
219
221
|
)
|
@@ -235,7 +237,8 @@ class TestStructureFuelAlertAdmin(TestCase):
|
|
235
237
|
|
236
238
|
class TestNotificationAdmin(TestCase):
|
237
239
|
@classmethod
|
238
|
-
def
|
240
|
+
def setUpClass(cls):
|
241
|
+
super().setUpClass()
|
239
242
|
cls.factory = RequestFactory()
|
240
243
|
load_eveuniverse()
|
241
244
|
cls.modeladmin = NotificationAdmin(model=Notification, admin_site=AdminSite())
|
@@ -355,7 +358,8 @@ class TestNotificationAdmin(TestCase):
|
|
355
358
|
|
356
359
|
class TestOwnerAdmin(TestCase):
|
357
360
|
@classmethod
|
358
|
-
def
|
361
|
+
def setUpClass(cls):
|
362
|
+
super().setUpClass()
|
359
363
|
cls.factory = RequestFactory()
|
360
364
|
cls.modeladmin = OwnerAdmin(model=Owner, admin_site=AdminSite())
|
361
365
|
load_eveuniverse()
|
@@ -454,7 +458,8 @@ class TestOwnerAdmin(TestCase):
|
|
454
458
|
|
455
459
|
class TestStructureAdmin(TestCase):
|
456
460
|
@classmethod
|
457
|
-
def
|
461
|
+
def setUpClass(cls):
|
462
|
+
super().setUpClass()
|
458
463
|
cls.factory = RequestFactory()
|
459
464
|
load_eveuniverse()
|
460
465
|
cls.modeladmin = StructureAdmin(model=Structure, admin_site=AdminSite())
|
@@ -609,7 +614,8 @@ class TestStructureAdmin(TestCase):
|
|
609
614
|
|
610
615
|
class TestWebhookAdmin(TestCase):
|
611
616
|
@classmethod
|
612
|
-
def
|
617
|
+
def setUpClass(cls):
|
618
|
+
super().setUpClass()
|
613
619
|
cls.modeladmin = WebhookAdmin(model=Webhook, admin_site=AdminSite())
|
614
620
|
cls.user = SuperuserFactory()
|
615
621
|
|
structures/tests/test_tasks.py
CHANGED
@@ -26,7 +26,8 @@ MODULE_PATH_MODELS_OWNERS = "structures.models.owners"
|
|
26
26
|
@patch(MODULE_PATH + ".Webhook.send_queued_messages", spec=True)
|
27
27
|
class TestSendMessagesForWebhook(TestCase):
|
28
28
|
@classmethod
|
29
|
-
def
|
29
|
+
def setUpClass(cls): # Can not be setUpTestData due to conflict with redis client
|
30
|
+
super().setUpClass()
|
30
31
|
cls.webhook = WebhookFactory()
|
31
32
|
|
32
33
|
def test_normal(self, mock_send_queued_messages):
|
structures/webhooks/models.py
CHANGED
@@ -33,7 +33,8 @@ class Webhook(core.DiscordWebhookMixin):
|
|
33
33
|
@patch(MODULE_PATH + ".sleep", lambda _: None)
|
34
34
|
class TestDiscordWebhookMixin(TestCase):
|
35
35
|
@classmethod
|
36
|
-
def
|
36
|
+
def setUpClass(cls): # Can not be setUpTestData due to conflict with redis client
|
37
|
+
super().setUpClass()
|
37
38
|
cls.webhook = WebhookFactory.build(name="Dummy 1", url="dummy-1-url")
|
38
39
|
|
39
40
|
def setUp(self) -> None:
|
@@ -144,7 +145,8 @@ class TestDiscordWebhookMixin(TestCase):
|
|
144
145
|
@patch(MODULE_PATH + ".dhooks_lite.Webhook.execute")
|
145
146
|
class TestSendTestMessage(TestCase):
|
146
147
|
@classmethod
|
147
|
-
def
|
148
|
+
def setUpClass(cls): # Can not be setUpTestData due to conflict with redis client
|
149
|
+
super().setUpClass()
|
148
150
|
cls.webhook = WebhookFactory(name="Dummy 1", url="dummy-1-url")
|
149
151
|
|
150
152
|
def setUp(self) -> None:
|
File without changes
|
File without changes
|