arthexis 0.1.5__tar.gz → 0.1.6__tar.gz
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.
Potentially problematic release.
This version of arthexis might be problematic. Click here for more details.
- {arthexis-0.1.5 → arthexis-0.1.6}/PKG-INFO +1 -1
- {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/PKG-INFO +1 -1
- {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/SOURCES.txt +1 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/admin.py +14 -2
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/admin.py +13 -1
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/tests.py +0 -5
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/views.py +0 -1
- {arthexis-0.1.5 → arthexis-0.1.6}/pyproject.toml +1 -1
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_inbox_search_action.py +5 -3
- arthexis-0.1.6/tests/test_post_office_admin_group.py +33 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/LICENSE +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/README.md +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/dependency_links.txt +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/requires.txt +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/top_level.txt +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/__init__.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/active_app.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/asgi.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/auth_app.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/celery.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/context_processors.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/loadenv.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/logging.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/middleware.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/offline.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/settings.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/urls.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/config/wsgi.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/__init__.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/apps.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/backends.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/entity.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/environment.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/fields.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/lcd_screen.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/middleware.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/models.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/notifications.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/release.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/system.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/tasks.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/tests.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/urls.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/user_data.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/core/views.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/__init__.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/actions.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/apps.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/lcd.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/models.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/tasks.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/urls.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/nodes/utils.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/__init__.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/admin.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/apps.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/consumers.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/evcs.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/models.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/routing.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/simulator.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/store.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/tasks.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/test_export_import.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/test_rfid.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/tests.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/transactions_io.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/urls.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/views.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/__init__.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/admin.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/apps.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/checks.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/context_processors.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/models.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/tests.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/urls.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/utils.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/pages/views.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/setup.cfg +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_acronym_capitalization.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_admin_history.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_admin_index_actions.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_awg_admin.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_csrf_failure.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_csrf_origin_subnet.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_collector.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_inbox.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_inbox_admin.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_env_refresh_clean.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_env_refresh_unlink.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_admin_link.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_no_references.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_presence.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_render.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_github_token.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_install_script.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_language_switch.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_lcd_smbus2.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_localhost_admin_backend.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_model_verbose_name_capitalization.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_notifications_fallback.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_notify_command.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_odoo_profile.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_odoo_profile_admin.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_offline.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_package_release_admin_actions.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_pypi_token.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_readme_language.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_reference_qr_code.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_reference_transaction_uuid.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_register_site_apps_command.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_fixture_cleanup.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_logs.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_mapping.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_progress.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_tasks.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_rfid_admin_reference_clear.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_rfid_admin_scan_csrf.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_rfid_background_reader.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_save_as_copy.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_seed_data.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_sigil_resolution.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_urls_autodiscover.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_user_datum_admin.py +0 -0
- {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_vscode_manage.py +0 -0
|
@@ -102,6 +102,7 @@ tests/test_odoo_profile.py
|
|
|
102
102
|
tests/test_odoo_profile_admin.py
|
|
103
103
|
tests/test_offline.py
|
|
104
104
|
tests/test_package_release_admin_actions.py
|
|
105
|
+
tests/test_post_office_admin_group.py
|
|
105
106
|
tests/test_pypi_token.py
|
|
106
107
|
tests/test_readme_language.py
|
|
107
108
|
tests/test_reference_qr_code.py
|
|
@@ -38,7 +38,7 @@ from .models import (
|
|
|
38
38
|
Reference,
|
|
39
39
|
OdooProfile,
|
|
40
40
|
FediverseProfile,
|
|
41
|
-
EmailInbox,
|
|
41
|
+
EmailInbox as CoreEmailInbox,
|
|
42
42
|
Package,
|
|
43
43
|
PackageRelease,
|
|
44
44
|
ReleaseManager,
|
|
@@ -380,6 +380,14 @@ class FediverseProfileAdmin(admin.ModelAdmin):
|
|
|
380
380
|
self.message_user(request, f"{profile}: {exc}", level=messages.ERROR)
|
|
381
381
|
|
|
382
382
|
|
|
383
|
+
class EmailInbox(CoreEmailInbox):
|
|
384
|
+
class Meta:
|
|
385
|
+
proxy = True
|
|
386
|
+
app_label = "post_office"
|
|
387
|
+
verbose_name = CoreEmailInbox._meta.verbose_name
|
|
388
|
+
verbose_name_plural = CoreEmailInbox._meta.verbose_name_plural
|
|
389
|
+
|
|
390
|
+
|
|
383
391
|
class EmailInboxAdminForm(forms.ModelForm):
|
|
384
392
|
"""Admin form for :class:`core.models.EmailInbox` with hidden password."""
|
|
385
393
|
|
|
@@ -390,7 +398,7 @@ class EmailInboxAdminForm(forms.ModelForm):
|
|
|
390
398
|
)
|
|
391
399
|
|
|
392
400
|
class Meta:
|
|
393
|
-
model =
|
|
401
|
+
model = CoreEmailInbox
|
|
394
402
|
fields = "__all__"
|
|
395
403
|
|
|
396
404
|
def __init__(self, *args, **kwargs):
|
|
@@ -445,6 +453,10 @@ class EmailInboxAdmin(admin.ModelAdmin):
|
|
|
445
453
|
),
|
|
446
454
|
)
|
|
447
455
|
|
|
456
|
+
def save_model(self, request, obj, form, change):
|
|
457
|
+
super().save_model(request, obj, form, change)
|
|
458
|
+
obj.__class__ = EmailInbox
|
|
459
|
+
|
|
448
460
|
@admin.action(description="Test selected inboxes")
|
|
449
461
|
def test_connection(self, request, queryset):
|
|
450
462
|
for inbox in queryset:
|
|
@@ -18,7 +18,7 @@ from .actions import NodeAction
|
|
|
18
18
|
|
|
19
19
|
from .models import (
|
|
20
20
|
Node,
|
|
21
|
-
EmailOutbox,
|
|
21
|
+
EmailOutbox as NodeEmailOutbox,
|
|
22
22
|
NodeRole,
|
|
23
23
|
ContentSample,
|
|
24
24
|
NodeTask,
|
|
@@ -181,10 +181,22 @@ class NodeAdmin(admin.ModelAdmin):
|
|
|
181
181
|
return redirect(reverse("admin:nodes_node_change", args=[node_id]))
|
|
182
182
|
|
|
183
183
|
|
|
184
|
+
class EmailOutbox(NodeEmailOutbox):
|
|
185
|
+
class Meta:
|
|
186
|
+
proxy = True
|
|
187
|
+
app_label = "post_office"
|
|
188
|
+
verbose_name = NodeEmailOutbox._meta.verbose_name
|
|
189
|
+
verbose_name_plural = NodeEmailOutbox._meta.verbose_name_plural
|
|
190
|
+
|
|
191
|
+
|
|
184
192
|
@admin.register(EmailOutbox)
|
|
185
193
|
class EmailOutboxAdmin(admin.ModelAdmin):
|
|
186
194
|
list_display = ("node", "host", "port", "username", "use_tls", "use_ssl")
|
|
187
195
|
|
|
196
|
+
def save_model(self, request, obj, form, change):
|
|
197
|
+
super().save_model(request, obj, form, change)
|
|
198
|
+
obj.__class__ = EmailOutbox
|
|
199
|
+
|
|
188
200
|
|
|
189
201
|
class NodeRoleAdminForm(forms.ModelForm):
|
|
190
202
|
nodes = forms.ModelMultipleChoiceField(
|
|
@@ -560,11 +560,6 @@ class NetMessageAdminTests(TransactionTestCase):
|
|
|
560
560
|
class LastNetMessageViewTests(TestCase):
|
|
561
561
|
def setUp(self):
|
|
562
562
|
self.client = Client()
|
|
563
|
-
User = get_user_model()
|
|
564
|
-
self.user = User.objects.create_user(
|
|
565
|
-
username="lastmsg", password="pwd"
|
|
566
|
-
)
|
|
567
|
-
self.client.force_login(self.user)
|
|
568
563
|
NodeRole.objects.get_or_create(name="Terminal")
|
|
569
564
|
|
|
570
565
|
def test_returns_latest_message(self):
|
|
@@ -4,7 +4,7 @@ from unittest.mock import patch
|
|
|
4
4
|
from django.contrib.admin.sites import AdminSite
|
|
5
5
|
from django.test import TestCase, RequestFactory
|
|
6
6
|
|
|
7
|
-
from core.admin import EmailInboxAdmin
|
|
7
|
+
from core.admin import EmailInboxAdmin, EmailInbox as AdminEmailInbox
|
|
8
8
|
from core.models import EmailInbox, User
|
|
9
9
|
|
|
10
10
|
|
|
@@ -93,11 +93,13 @@ class EmailInboxSearchTests(TestCase):
|
|
|
93
93
|
use_ssl=True,
|
|
94
94
|
)
|
|
95
95
|
site = AdminSite()
|
|
96
|
-
ma = EmailInboxAdmin(
|
|
96
|
+
ma = EmailInboxAdmin(AdminEmailInbox, site)
|
|
97
97
|
factory = RequestFactory()
|
|
98
98
|
request = factory.post("/", {"apply": "yes", "subject": "S"})
|
|
99
99
|
request.user = admin
|
|
100
|
-
response = ma.search_inbox(
|
|
100
|
+
response = ma.search_inbox(
|
|
101
|
+
request, AdminEmailInbox.objects.filter(id=inbox.id)
|
|
102
|
+
)
|
|
101
103
|
self.assertEqual(response.status_code, 200)
|
|
102
104
|
content = response.render().content.decode()
|
|
103
105
|
self.assertIn("S", content)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from django.test import TestCase
|
|
2
|
+
from django.contrib.auth import get_user_model
|
|
3
|
+
from django.urls import reverse
|
|
4
|
+
from django.contrib.admin.sites import site
|
|
5
|
+
|
|
6
|
+
from core.admin import EmailInbox as PostOfficeEmailInbox
|
|
7
|
+
from nodes.admin import EmailOutbox as PostOfficeEmailOutbox
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PostOfficeAdminGroupTests(TestCase):
|
|
11
|
+
def setUp(self):
|
|
12
|
+
User = get_user_model()
|
|
13
|
+
self.admin = User.objects.create_superuser(
|
|
14
|
+
username="po-admin", password="pwd", email="admin@example.com"
|
|
15
|
+
)
|
|
16
|
+
self.client.force_login(self.admin)
|
|
17
|
+
|
|
18
|
+
def test_models_registered(self):
|
|
19
|
+
registry = site._registry
|
|
20
|
+
self.assertIn(PostOfficeEmailInbox, registry)
|
|
21
|
+
self.assertIn(PostOfficeEmailOutbox, registry)
|
|
22
|
+
self.assertEqual(
|
|
23
|
+
registry[PostOfficeEmailInbox].model._meta.app_label, "post_office"
|
|
24
|
+
)
|
|
25
|
+
self.assertEqual(
|
|
26
|
+
registry[PostOfficeEmailOutbox].model._meta.app_label, "post_office"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
def test_admin_index_shows_post_office_group(self):
|
|
30
|
+
response = self.client.get(reverse("admin:index"))
|
|
31
|
+
self.assertContains(response, "Post Office")
|
|
32
|
+
self.assertContains(response, "Email Inboxes")
|
|
33
|
+
self.assertContains(response, "Email Outboxes")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|