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.

Files changed (126) hide show
  1. {arthexis-0.1.5 → arthexis-0.1.6}/PKG-INFO +1 -1
  2. {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/PKG-INFO +1 -1
  3. {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/SOURCES.txt +1 -0
  4. {arthexis-0.1.5 → arthexis-0.1.6}/core/admin.py +14 -2
  5. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/admin.py +13 -1
  6. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/tests.py +0 -5
  7. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/views.py +0 -1
  8. {arthexis-0.1.5 → arthexis-0.1.6}/pyproject.toml +1 -1
  9. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_inbox_search_action.py +5 -3
  10. arthexis-0.1.6/tests/test_post_office_admin_group.py +33 -0
  11. {arthexis-0.1.5 → arthexis-0.1.6}/LICENSE +0 -0
  12. {arthexis-0.1.5 → arthexis-0.1.6}/README.md +0 -0
  13. {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/dependency_links.txt +0 -0
  14. {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/requires.txt +0 -0
  15. {arthexis-0.1.5 → arthexis-0.1.6}/arthexis.egg-info/top_level.txt +0 -0
  16. {arthexis-0.1.5 → arthexis-0.1.6}/config/__init__.py +0 -0
  17. {arthexis-0.1.5 → arthexis-0.1.6}/config/active_app.py +0 -0
  18. {arthexis-0.1.5 → arthexis-0.1.6}/config/asgi.py +0 -0
  19. {arthexis-0.1.5 → arthexis-0.1.6}/config/auth_app.py +0 -0
  20. {arthexis-0.1.5 → arthexis-0.1.6}/config/celery.py +0 -0
  21. {arthexis-0.1.5 → arthexis-0.1.6}/config/context_processors.py +0 -0
  22. {arthexis-0.1.5 → arthexis-0.1.6}/config/loadenv.py +0 -0
  23. {arthexis-0.1.5 → arthexis-0.1.6}/config/logging.py +0 -0
  24. {arthexis-0.1.5 → arthexis-0.1.6}/config/middleware.py +0 -0
  25. {arthexis-0.1.5 → arthexis-0.1.6}/config/offline.py +0 -0
  26. {arthexis-0.1.5 → arthexis-0.1.6}/config/settings.py +0 -0
  27. {arthexis-0.1.5 → arthexis-0.1.6}/config/urls.py +0 -0
  28. {arthexis-0.1.5 → arthexis-0.1.6}/config/wsgi.py +0 -0
  29. {arthexis-0.1.5 → arthexis-0.1.6}/core/__init__.py +0 -0
  30. {arthexis-0.1.5 → arthexis-0.1.6}/core/apps.py +0 -0
  31. {arthexis-0.1.5 → arthexis-0.1.6}/core/backends.py +0 -0
  32. {arthexis-0.1.5 → arthexis-0.1.6}/core/entity.py +0 -0
  33. {arthexis-0.1.5 → arthexis-0.1.6}/core/environment.py +0 -0
  34. {arthexis-0.1.5 → arthexis-0.1.6}/core/fields.py +0 -0
  35. {arthexis-0.1.5 → arthexis-0.1.6}/core/lcd_screen.py +0 -0
  36. {arthexis-0.1.5 → arthexis-0.1.6}/core/middleware.py +0 -0
  37. {arthexis-0.1.5 → arthexis-0.1.6}/core/models.py +0 -0
  38. {arthexis-0.1.5 → arthexis-0.1.6}/core/notifications.py +0 -0
  39. {arthexis-0.1.5 → arthexis-0.1.6}/core/release.py +0 -0
  40. {arthexis-0.1.5 → arthexis-0.1.6}/core/system.py +0 -0
  41. {arthexis-0.1.5 → arthexis-0.1.6}/core/tasks.py +0 -0
  42. {arthexis-0.1.5 → arthexis-0.1.6}/core/tests.py +0 -0
  43. {arthexis-0.1.5 → arthexis-0.1.6}/core/urls.py +0 -0
  44. {arthexis-0.1.5 → arthexis-0.1.6}/core/user_data.py +0 -0
  45. {arthexis-0.1.5 → arthexis-0.1.6}/core/views.py +0 -0
  46. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/__init__.py +0 -0
  47. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/actions.py +0 -0
  48. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/apps.py +0 -0
  49. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/lcd.py +0 -0
  50. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/models.py +0 -0
  51. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/tasks.py +0 -0
  52. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/urls.py +0 -0
  53. {arthexis-0.1.5 → arthexis-0.1.6}/nodes/utils.py +0 -0
  54. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/__init__.py +0 -0
  55. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/admin.py +0 -0
  56. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/apps.py +0 -0
  57. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/consumers.py +0 -0
  58. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/evcs.py +0 -0
  59. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/models.py +0 -0
  60. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/routing.py +0 -0
  61. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/simulator.py +0 -0
  62. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/store.py +0 -0
  63. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/tasks.py +0 -0
  64. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/test_export_import.py +0 -0
  65. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/test_rfid.py +0 -0
  66. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/tests.py +0 -0
  67. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/transactions_io.py +0 -0
  68. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/urls.py +0 -0
  69. {arthexis-0.1.5 → arthexis-0.1.6}/ocpp/views.py +0 -0
  70. {arthexis-0.1.5 → arthexis-0.1.6}/pages/__init__.py +0 -0
  71. {arthexis-0.1.5 → arthexis-0.1.6}/pages/admin.py +0 -0
  72. {arthexis-0.1.5 → arthexis-0.1.6}/pages/apps.py +0 -0
  73. {arthexis-0.1.5 → arthexis-0.1.6}/pages/checks.py +0 -0
  74. {arthexis-0.1.5 → arthexis-0.1.6}/pages/context_processors.py +0 -0
  75. {arthexis-0.1.5 → arthexis-0.1.6}/pages/models.py +0 -0
  76. {arthexis-0.1.5 → arthexis-0.1.6}/pages/tests.py +0 -0
  77. {arthexis-0.1.5 → arthexis-0.1.6}/pages/urls.py +0 -0
  78. {arthexis-0.1.5 → arthexis-0.1.6}/pages/utils.py +0 -0
  79. {arthexis-0.1.5 → arthexis-0.1.6}/pages/views.py +0 -0
  80. {arthexis-0.1.5 → arthexis-0.1.6}/setup.cfg +0 -0
  81. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_acronym_capitalization.py +0 -0
  82. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_admin_history.py +0 -0
  83. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_admin_index_actions.py +0 -0
  84. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_awg_admin.py +0 -0
  85. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_csrf_failure.py +0 -0
  86. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_csrf_origin_subnet.py +0 -0
  87. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_collector.py +0 -0
  88. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_inbox.py +0 -0
  89. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_email_inbox_admin.py +0 -0
  90. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_env_refresh_clean.py +0 -0
  91. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_env_refresh_unlink.py +0 -0
  92. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_admin_link.py +0 -0
  93. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_no_references.py +0 -0
  94. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_presence.py +0 -0
  95. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_footer_render.py +0 -0
  96. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_github_token.py +0 -0
  97. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_install_script.py +0 -0
  98. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_language_switch.py +0 -0
  99. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_lcd_smbus2.py +0 -0
  100. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_localhost_admin_backend.py +0 -0
  101. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_model_verbose_name_capitalization.py +0 -0
  102. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_notifications_fallback.py +0 -0
  103. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_notify_command.py +0 -0
  104. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_odoo_profile.py +0 -0
  105. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_odoo_profile_admin.py +0 -0
  106. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_offline.py +0 -0
  107. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_package_release_admin_actions.py +0 -0
  108. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_pypi_token.py +0 -0
  109. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_readme_language.py +0 -0
  110. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_reference_qr_code.py +0 -0
  111. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_reference_transaction_uuid.py +0 -0
  112. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_register_site_apps_command.py +0 -0
  113. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_fixture_cleanup.py +0 -0
  114. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_logs.py +0 -0
  115. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_mapping.py +0 -0
  116. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_progress.py +0 -0
  117. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_release_tasks.py +0 -0
  118. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_rfid_admin_reference_clear.py +0 -0
  119. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_rfid_admin_scan_csrf.py +0 -0
  120. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_rfid_background_reader.py +0 -0
  121. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_save_as_copy.py +0 -0
  122. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_seed_data.py +0 -0
  123. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_sigil_resolution.py +0 -0
  124. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_urls_autodiscover.py +0 -0
  125. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_user_datum_admin.py +0 -0
  126. {arthexis-0.1.5 → arthexis-0.1.6}/tests/test_vscode_manage.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arthexis
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Django-based MESH system
5
5
  Author-email: "Rafael J. Guillén-Osorio" <tecnologia@gelectriic.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arthexis
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Django-based MESH system
5
5
  Author-email: "Rafael J. Guillén-Osorio" <tecnologia@gelectriic.com>
6
6
  License-Expression: MIT
@@ -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 = EmailInbox
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):
@@ -252,7 +252,6 @@ def net_message(request):
252
252
  return JsonResponse({"status": "propagated", "complete": msg.complete})
253
253
 
254
254
 
255
- @api_login_required
256
255
  def last_net_message(request):
257
256
  """Return the most recent :class:`NetMessage`."""
258
257
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "arthexis"
7
- version = "0.1.5"
7
+ version = "0.1.6"
8
8
  description = "Django-based MESH system"
9
9
  requires-python = ">=3.10"
10
10
  license = "MIT"
@@ -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(EmailInbox, site)
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(request, EmailInbox.objects.filter(id=inbox.id))
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