aa-structures 2.15.0__tar.gz → 2.16.0__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.
- {aa_structures-2.15.0 → aa_structures-2.16.0}/PKG-INFO +1 -1
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/__init__.py +1 -1
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/constants.py +6 -3
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/managers.py +1 -1
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/models/owners.py +96 -56
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_owners_2.py +103 -59
- aa_structures-2.16.0/structures/tests/testdata/constants.py +22 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/create_eveuniverse.py +1 -3
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/eveuniverse.json +15503 -6784
- {aa_structures-2.15.0 → aa_structures-2.16.0}/LICENSE +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/README.md +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/pyproject.toml +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/admin.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/app_settings.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/apps.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/auth_hooks.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/billing_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/corporate_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/helpers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/main.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/moonmining_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/orbital_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/skyhook_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/sov_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/structures_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/tower_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_embeds/war_embeds.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_timers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/notification_types.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/serializers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/sovereignty.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/core/starbases.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/forms.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/helpers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/de/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/de/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/django.pot +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/en/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/en/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/es/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/es/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/fr_FR/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/it_IT/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/it_IT/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/ja/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/ja/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/ko_KR/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/ru/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/ru/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/uk/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/uk/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/management/commands/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/management/commands/structures_load_eve.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/management/commands/structures_preload_eveuniverse.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/management/commands/structures_update_poco_planets.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0001_initial_new.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0002_remove_eveuniverse_relation_names.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0003_add_localization_and_unique_key.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0004_improve_localization.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0005_add_notification_types.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0006_add_ownercharacter_disabled.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0007_add_notificationtypes_skyhook_metenox.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/0008_add_notificationtypes_skyhook_metenox.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/migrations/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/models/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/models/eveuniverse.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/models/notifications.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/models/structures_1.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/models/structures_2.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/providers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/css/global.css +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/css/main.css +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/css/public.css +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/css/statistics.css +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/css/structures.css +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/bars-rotate-fade-black-36.svg +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/bars-rotate-fade-white-36.svg +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/eve_symbol_128.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/0h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/0l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/0m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/0r.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/0s.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/1h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/1l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/1m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/1r.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/2h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/2l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/2m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/2r.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/3h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/3l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/3m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/3r.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/4h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/4l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/4m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/4s.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/5h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/5l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/5m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/5s.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/6h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/6l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/6m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/7h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/7l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/7m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/8h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/8l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/8m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/blank.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/circle.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/dustwheel.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/h.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/l.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/m.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/noship.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/r.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/tyrannis.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/tyrannis_blue.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/tyrannis_darkred.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/tyrannis_default.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/panel/tyrannis_revelations.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/img/structures_logo.png +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/js/global.js +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/js/public.js +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/js/statistics.js +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/js/structures.js +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/vendor/datatables/plugins/dataTables.rowGroup.min.js +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/vendor/datatables/plugins/datetime.js +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/vendor/datatables/plugins/filterDropDown.min.js +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/vendor/datatables/plugins/rowGroup.bootstrap.min.css +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/static/structures/vendor/datatables/plugins/rowGroup.dataTables.min.css +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tasks.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/base.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/modals/fitting_assets.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/modals/fitting_gfx.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/modals/poco_details.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/modals/starbase_detail.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/modals/structure_details.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/modals/tab_general_detail.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/modals/tab_services_detail.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/menu.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/public/poco_list.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/statistics/structure_summary.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/structures/active_tags.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/structures/jump_gate_list.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/structures/orbital_list.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/structures/starbase_list.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/partials/structures/structure_list.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/public.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/statistics.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/structures.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/templatetags/detail_title.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/templatetags/list_asset.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/templatetags/list_item.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/templatetags/list_tax_item.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templates/structures/templatetags/list_title.html +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templatetags/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/templatetags/structures.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/notification_embeds/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/notification_embeds/test_helpers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/notification_embeds/test_main.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/test_notification_structuretimers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/test_notification_types.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/test_notifications_timers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/test_serializers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/test_sovereignty.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/core/test_starbases.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/integration/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/integration/test_tasks.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/integration/test_views.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_eveuniverse.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_notifications_1.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_notifications_2.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_notifications_3.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_notifications_discord.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_owners_1.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_owners_3.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_owners_4.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_owners_5.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_owners_6.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/models/test_structures.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/test_admin.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/test_helpers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/test_managers_1.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/test_managers_2.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/test_tasks.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/entities.json +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/esi_data.json +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/factories.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/generate_notifications.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/generate_notifications_2.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/generate_structures.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/helpers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/load_eveuniverse.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/tasks_loadtest.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/test_generate_structures.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/views/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/views/test_public.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/views/test_service_status.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/views/test_statistics.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/views/test_structures.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/views/utils.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/urls.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/views/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/views/common.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/views/public.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/views/statistics.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/views/status.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/views/structures.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/webhooks/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/webhooks/core.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/webhooks/managers.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/webhooks/models.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/webhooks/tests/__init__.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/webhooks/tests/test_core.py +0 -0
- {aa_structures-2.15.0 → aa_structures-2.16.0}/structures/webhooks/tests/test_utils.py +0 -0
@@ -16,6 +16,7 @@ class EveCategoryId(IntEnum):
|
|
16
16
|
ORBITAL = 46
|
17
17
|
STARBASE = 23
|
18
18
|
STRUCTURE = 65
|
19
|
+
STRUCTURE_MODULE = 66
|
19
20
|
|
20
21
|
|
21
22
|
class EveGroupId(IntEnum):
|
@@ -26,11 +27,13 @@ class EveGroupId(IntEnum):
|
|
26
27
|
ENGINEERING_COMPLEX = 1404
|
27
28
|
FUEL_BLOCK = 1136
|
28
29
|
ICE_PRODUCT = 423
|
29
|
-
|
30
|
+
MOON = 8
|
30
31
|
PLANET = 7
|
32
|
+
QUANTUM_CORES = 4086
|
33
|
+
REFINERY = 1406
|
31
34
|
STRUCTURE_CITADEL_SERVICE_MODULE = 1321
|
32
35
|
UNCOMMON_MOON_ASTEROIDS = 1921
|
33
|
-
|
36
|
+
UPWELL_MOON_DRILL = 4744
|
34
37
|
|
35
38
|
|
36
39
|
class EveTypeId(IntEnum):
|
@@ -42,8 +45,8 @@ class EveTypeId(IntEnum):
|
|
42
45
|
IHUB = 32458
|
43
46
|
JUMP_GATE = 35841
|
44
47
|
LIQUID_OZONE = 16273
|
45
|
-
ORBITAL_SKYHOOK = 81080
|
46
48
|
NITROGEN_FUEL_BLOCK = 4051
|
49
|
+
ORBITAL_SKYHOOK = 81080
|
47
50
|
STRONTIUM = 16275
|
48
51
|
TCU = 32226
|
49
52
|
|
@@ -392,7 +392,7 @@ class StructureManagerBase(models.Manager):
|
|
392
392
|
def update_or_create_from_dict(
|
393
393
|
self, structure: dict, owner: Owner
|
394
394
|
) -> Tuple[Any, bool]:
|
395
|
-
"""
|
395
|
+
"""Update or create a structure from a dict."""
|
396
396
|
|
397
397
|
eve_type: EveType = EveType.objects.get_or_create_esi(id=structure["type_id"])[
|
398
398
|
0
|
@@ -585,14 +585,10 @@ class Owner(models.Model):
|
|
585
585
|
return positions
|
586
586
|
|
587
587
|
def _fetch_upwell_structures(self, token: Token) -> bool:
|
588
|
-
"""
|
589
|
-
|
590
|
-
Return True if successful, else False.
|
591
|
-
"""
|
592
|
-
is_ok = True
|
588
|
+
"""Fetches Upwell structures from ESI an reports whether it was successful."""
|
593
589
|
# fetch main list of structure for this corporation
|
594
590
|
try:
|
595
|
-
structures
|
591
|
+
structures = (
|
596
592
|
esi.client.Corporation.get_corporations_corporation_id_structures(
|
597
593
|
corporation_id=self.corporation.corporation_id,
|
598
594
|
token=token.valid_access_token(),
|
@@ -604,58 +600,12 @@ class Owner(models.Model):
|
|
604
600
|
|
605
601
|
# fetch additional information for structures
|
606
602
|
if not structures:
|
603
|
+
is_ok = True
|
607
604
|
logger.info("%s: No Upwell structures retrieved from ESI", self)
|
608
605
|
else:
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
len(structures),
|
613
|
-
)
|
614
|
-
for structure in structures:
|
615
|
-
try:
|
616
|
-
structure_info = (
|
617
|
-
esi.client.Universe.get_universe_structures_structure_id(
|
618
|
-
structure_id=structure["structure_id"],
|
619
|
-
token=token.valid_access_token(),
|
620
|
-
)
|
621
|
-
).results()
|
622
|
-
except OSError as ex:
|
623
|
-
if isinstance(ex, HTTPForbidden):
|
624
|
-
logger.error(
|
625
|
-
"Failed to fetch structure with ID #%d belonging to %s, "
|
626
|
-
"because the character '%s' is missing "
|
627
|
-
"docking rights for it.",
|
628
|
-
structure["structure_id"],
|
629
|
-
self,
|
630
|
-
token.character_name,
|
631
|
-
)
|
632
|
-
else:
|
633
|
-
self._report_esi_issue(
|
634
|
-
f"fetch structure #{structure['structure_id']}", ex, token
|
635
|
-
)
|
636
|
-
structure["name"] = "(no data)"
|
637
|
-
is_ok = False
|
638
|
-
else:
|
639
|
-
structure["name"] = Structure.extract_name_from_esi_response(
|
640
|
-
structure_info["name"]
|
641
|
-
)
|
642
|
-
structure["position"] = structure_info["position"]
|
643
|
-
|
644
|
-
logger.info(
|
645
|
-
"%s: Storing updates for %d upwell structures",
|
646
|
-
self,
|
647
|
-
len(structures),
|
648
|
-
)
|
649
|
-
for structure in structures:
|
650
|
-
try:
|
651
|
-
Structure.objects.update_or_create_from_dict(structure, self)
|
652
|
-
except OSError:
|
653
|
-
logger.warning(
|
654
|
-
"%s: Failed to store update for structure with ID %s",
|
655
|
-
self,
|
656
|
-
structure["structure_id"],
|
657
|
-
)
|
658
|
-
is_ok = False
|
606
|
+
is_ok = self._fetch_universe_infos_for_structures(token, structures)
|
607
|
+
is_ok &= self._store_structure_updates(structures)
|
608
|
+
self._resolve_metenox_moons()
|
659
609
|
|
660
610
|
if STRUCTURES_DEVELOPER_MODE:
|
661
611
|
self._store_raw_data("structures", structures)
|
@@ -666,6 +616,95 @@ class Owner(models.Model):
|
|
666
616
|
)
|
667
617
|
return is_ok
|
668
618
|
|
619
|
+
def _fetch_universe_infos_for_structures(
|
620
|
+
self, token, structures: List[dict]
|
621
|
+
) -> bool:
|
622
|
+
count = 0
|
623
|
+
for s in structures:
|
624
|
+
try:
|
625
|
+
structure_info = (
|
626
|
+
esi.client.Universe.get_universe_structures_structure_id(
|
627
|
+
structure_id=s["structure_id"],
|
628
|
+
token=token.valid_access_token(),
|
629
|
+
)
|
630
|
+
).results()
|
631
|
+
except OSError as ex:
|
632
|
+
if isinstance(ex, HTTPForbidden):
|
633
|
+
logger.error(
|
634
|
+
"Failed to fetch structure with ID #%d belonging to %s, "
|
635
|
+
"because the character '%s' is missing docking rights.",
|
636
|
+
s["structure_id"],
|
637
|
+
self,
|
638
|
+
token.character_name,
|
639
|
+
)
|
640
|
+
else:
|
641
|
+
self._report_esi_issue(
|
642
|
+
f"fetch structure #{s['structure_id']}", ex, token
|
643
|
+
)
|
644
|
+
s["name"] = "(no data)"
|
645
|
+
else:
|
646
|
+
count += 1
|
647
|
+
s["name"] = Structure.extract_name_from_esi_response(
|
648
|
+
structure_info["name"]
|
649
|
+
)
|
650
|
+
s["position"] = structure_info["position"]
|
651
|
+
|
652
|
+
logger.info(
|
653
|
+
"%s: Fetched universe infos for %d / %d Upwell structures from ESI",
|
654
|
+
self,
|
655
|
+
count,
|
656
|
+
len(structures),
|
657
|
+
)
|
658
|
+
return count == len(structures)
|
659
|
+
|
660
|
+
def _store_structure_updates(self, structures: List[dict]) -> bool:
|
661
|
+
count = 0
|
662
|
+
for s in structures:
|
663
|
+
try:
|
664
|
+
Structure.objects.update_or_create_from_dict(s, self)
|
665
|
+
except OSError:
|
666
|
+
logger.warning(
|
667
|
+
"%s: Failed to store update for structure with ID %s",
|
668
|
+
self,
|
669
|
+
s["structure_id"],
|
670
|
+
)
|
671
|
+
else:
|
672
|
+
count += 1
|
673
|
+
logger.info(
|
674
|
+
"%s: Stored updates for %d/%d upwell structures",
|
675
|
+
self,
|
676
|
+
count,
|
677
|
+
len(structures),
|
678
|
+
)
|
679
|
+
return count == len(structures)
|
680
|
+
|
681
|
+
def _resolve_metenox_moons(self):
|
682
|
+
"""Add moons to all unresolved metenox structures."""
|
683
|
+
s: Structure
|
684
|
+
for s in self.structures.filter(
|
685
|
+
eve_type__eve_group=EveGroupId.UPWELL_MOON_DRILL,
|
686
|
+
eve_moon__isnull=True,
|
687
|
+
position_x__isnull=False,
|
688
|
+
position_y__isnull=False,
|
689
|
+
position_z__isnull=False,
|
690
|
+
):
|
691
|
+
try:
|
692
|
+
celestial = s.eve_solar_system.nearest_celestial(
|
693
|
+
x=s.position_x,
|
694
|
+
y=s.position_y,
|
695
|
+
z=s.position_z,
|
696
|
+
group_id=EveGroupId.MOON,
|
697
|
+
)
|
698
|
+
except OSError:
|
699
|
+
continue
|
700
|
+
|
701
|
+
if not celestial or not isinstance(celestial.eve_object, EveMoon):
|
702
|
+
continue
|
703
|
+
|
704
|
+
s.eve_moon = celestial.eve_object
|
705
|
+
s.save()
|
706
|
+
logger.info("%s: Resolved moon for Metenox: %d", self, s.name)
|
707
|
+
|
669
708
|
def _fetch_custom_offices(self, token: Token) -> bool:
|
670
709
|
"""Fetch custom offices from ESI for this owner.
|
671
710
|
|
@@ -1375,6 +1414,7 @@ class Owner(models.Model):
|
|
1375
1414
|
s.eve_planet = celestial.eve_object
|
1376
1415
|
s.name = celestial.eve_type.name
|
1377
1416
|
s.save()
|
1417
|
+
logger.info("%s: Resolved moon for Skyhook at: %s", self, s.eve_planet.name)
|
1378
1418
|
|
1379
1419
|
@staticmethod
|
1380
1420
|
def get_esi_scopes() -> List[str]:
|
@@ -2,6 +2,7 @@ import datetime as dt
|
|
2
2
|
from unittest.mock import patch
|
3
3
|
|
4
4
|
from django.utils.timezone import now, utc
|
5
|
+
from eveuniverse.models import EveMoon
|
5
6
|
|
6
7
|
from app_utils.esi_testing import EsiClientStub, EsiEndpoint
|
7
8
|
from app_utils.testing import NoSocketsTestCase
|
@@ -10,6 +11,7 @@ from structures.constants import EveCorporationId
|
|
10
11
|
from structures.core.notification_types import NotificationType
|
11
12
|
from structures.models import Structure, StructureService
|
12
13
|
from structures.tests import to_json
|
14
|
+
from structures.tests.testdata.constants import EveMoonId, EveSolarSystemId, EveTypeId
|
13
15
|
from structures.tests.testdata.factories import (
|
14
16
|
EveEntityCorporationFactory,
|
15
17
|
FuelAlertConfigFactory,
|
@@ -20,6 +22,7 @@ from structures.tests.testdata.factories import (
|
|
20
22
|
UserMainDefaultOwnerFactory,
|
21
23
|
WebhookFactory,
|
22
24
|
)
|
25
|
+
from structures.tests.testdata.helpers import NearestCelestial
|
23
26
|
from structures.tests.testdata.load_eveuniverse import load_eveuniverse
|
24
27
|
|
25
28
|
MODULE_PATH = "structures.models.owners"
|
@@ -40,54 +43,6 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
40
43
|
id=EveCorporationId.DED, name="DED"
|
41
44
|
) # for notifications
|
42
45
|
cls.endpoints = [
|
43
|
-
EsiEndpoint(
|
44
|
-
"Assets",
|
45
|
-
"get_corporations_corporation_id_assets",
|
46
|
-
"corporation_id",
|
47
|
-
needs_token=True,
|
48
|
-
data={
|
49
|
-
str(cls.corporation_id): [
|
50
|
-
{
|
51
|
-
"is_singleton": False,
|
52
|
-
"item_id": 1300000001001,
|
53
|
-
"location_flag": "QuantumCoreRoom",
|
54
|
-
"location_id": 1000000000001,
|
55
|
-
"location_type": "item",
|
56
|
-
"quantity": 1,
|
57
|
-
"type_id": 56201, # Astrahus Upwell Quantum Core
|
58
|
-
},
|
59
|
-
{
|
60
|
-
"is_singleton": True,
|
61
|
-
"item_id": 1300000001002,
|
62
|
-
"location_flag": "ServiceSlot0",
|
63
|
-
"location_id": 1000000000001,
|
64
|
-
"location_type": "item",
|
65
|
-
"quantity": 1,
|
66
|
-
"type_id": 35894, # Standup Cloning Center I
|
67
|
-
},
|
68
|
-
{
|
69
|
-
"is_singleton": True,
|
70
|
-
"item_id": 1300000002001,
|
71
|
-
"location_flag": "ServiceSlot0",
|
72
|
-
"location_id": 1000000000002,
|
73
|
-
"location_type": "item",
|
74
|
-
"quantity": 1,
|
75
|
-
"type_id": 35894, # Standup Cloning Center I
|
76
|
-
},
|
77
|
-
],
|
78
|
-
"2102": [
|
79
|
-
{
|
80
|
-
"is_singleton": False,
|
81
|
-
"item_id": 1300000003001,
|
82
|
-
"location_flag": "StructureFuel",
|
83
|
-
"location_id": 1000000000004,
|
84
|
-
"location_type": "item",
|
85
|
-
"quantity": 5000,
|
86
|
-
"type_id": 16273, # Liquid Ozone
|
87
|
-
}
|
88
|
-
],
|
89
|
-
},
|
90
|
-
),
|
91
46
|
EsiEndpoint(
|
92
47
|
"Corporation",
|
93
48
|
"get_corporations_corporation_id_structures",
|
@@ -110,8 +65,8 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
110
65
|
"state_timer_end": None,
|
111
66
|
"state_timer_start": None,
|
112
67
|
"structure_id": 1000000000002,
|
113
|
-
"system_id":
|
114
|
-
"type_id":
|
68
|
+
"system_id": EveSolarSystemId.AMAMAKE,
|
69
|
+
"type_id": EveTypeId.ATHANOR,
|
115
70
|
"unanchors_at": None,
|
116
71
|
},
|
117
72
|
{
|
@@ -131,8 +86,8 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
131
86
|
2020, 4, 5, 6, 30, tzinfo=utc
|
132
87
|
),
|
133
88
|
"structure_id": 1000000000001,
|
134
|
-
"system_id":
|
135
|
-
"type_id":
|
89
|
+
"system_id": EveSolarSystemId.AMAMAKE,
|
90
|
+
"type_id": EveTypeId.ASTRAHUS,
|
136
91
|
"unanchors_at": dt.datetime(2020, 5, 5, 6, 30, tzinfo=utc),
|
137
92
|
},
|
138
93
|
{
|
@@ -148,7 +103,7 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
148
103
|
"state_timer_start": None,
|
149
104
|
"structure_id": 1000000000003,
|
150
105
|
"system_id": 30000476,
|
151
|
-
"type_id":
|
106
|
+
"type_id": EveTypeId.ASTRAHUS,
|
152
107
|
"unanchors_at": None,
|
153
108
|
},
|
154
109
|
],
|
@@ -168,8 +123,8 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
168
123
|
"y": 7310316270.0,
|
169
124
|
"z": -163686684205.0,
|
170
125
|
},
|
171
|
-
"solar_system_id":
|
172
|
-
"type_id":
|
126
|
+
"solar_system_id": EveSolarSystemId.AMAMAKE,
|
127
|
+
"type_id": EveTypeId.ASTRAHUS,
|
173
128
|
},
|
174
129
|
"1000000000002": {
|
175
130
|
"corporation_id": cls.corporation_id,
|
@@ -179,8 +134,8 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
179
134
|
"y": -130157937025.56424,
|
180
135
|
"z": -442026427345.6355,
|
181
136
|
},
|
182
|
-
"solar_system_id":
|
183
|
-
"type_id":
|
137
|
+
"solar_system_id": EveSolarSystemId.AMAMAKE,
|
138
|
+
"type_id": EveTypeId.ATHANOR,
|
184
139
|
},
|
185
140
|
"1000000000003": {
|
186
141
|
"corporation_id": cls.corporation_id,
|
@@ -191,7 +146,7 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
191
146
|
"z": -442026427345.6355,
|
192
147
|
},
|
193
148
|
"solar_system_id": 30000476,
|
194
|
-
"type_id":
|
149
|
+
"type_id": EveTypeId.ASTRAHUS,
|
195
150
|
},
|
196
151
|
},
|
197
152
|
),
|
@@ -221,7 +176,7 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
221
176
|
self.assertEqual(structure.position_x, 55028384780.0)
|
222
177
|
self.assertEqual(structure.position_y, 7310316270.0)
|
223
178
|
self.assertEqual(structure.position_z, -163686684205.0)
|
224
|
-
self.assertEqual(structure.eve_solar_system_id,
|
179
|
+
self.assertEqual(structure.eve_solar_system_id, EveSolarSystemId.AMAMAKE)
|
225
180
|
self.assertEqual(structure.eve_type_id, 35832)
|
226
181
|
self.assertEqual(
|
227
182
|
int(structure.owner.corporation.corporation_id), self.corporation_id
|
@@ -550,3 +505,92 @@ class TestUpdateStructuresEsi(NoSocketsTestCase):
|
|
550
505
|
owner.update_structures_esi()
|
551
506
|
# then
|
552
507
|
self.assertEqual(structure.structure_fuel_alerts.count(), 0)
|
508
|
+
|
509
|
+
|
510
|
+
@patch(MODULE_PATH + ".STRUCTURES_FEATURE_STARBASES", False)
|
511
|
+
@patch(MODULE_PATH + ".STRUCTURES_FEATURE_CUSTOMS_OFFICES", False)
|
512
|
+
@patch(MODULE_PATH + ".esi")
|
513
|
+
class TestUpdateSpecificUpwellStructuresEsi(NoSocketsTestCase):
|
514
|
+
@classmethod
|
515
|
+
def setUpClass(cls):
|
516
|
+
super().setUpClass()
|
517
|
+
load_eveuniverse()
|
518
|
+
cls.user = UserMainDefaultOwnerFactory()
|
519
|
+
cls.owner = OwnerFactory(user=cls.user, structures_last_update_at=None)
|
520
|
+
cls.corporation_id = cls.owner.corporation.corporation_id
|
521
|
+
EveEntityCorporationFactory(
|
522
|
+
id=EveCorporationId.DED, name="DED"
|
523
|
+
) # for notifications
|
524
|
+
|
525
|
+
def test_can_update_metenox(self, mock_esi):
|
526
|
+
structure_id = 1000000000111
|
527
|
+
type_id = EveTypeId.METENOX
|
528
|
+
solar_system_id = EveSolarSystemId.AMAMAKE
|
529
|
+
endpoints = [
|
530
|
+
EsiEndpoint(
|
531
|
+
"Corporation",
|
532
|
+
"get_corporations_corporation_id_structures",
|
533
|
+
"corporation_id",
|
534
|
+
needs_token=True,
|
535
|
+
data={
|
536
|
+
str(self.corporation_id): [
|
537
|
+
{
|
538
|
+
"corporation_id": self.corporation_id,
|
539
|
+
"fuel_expires": dt.datetime(2020, 3, 5, 5, tzinfo=utc),
|
540
|
+
"next_reinforce_apply": None,
|
541
|
+
"next_reinforce_hour": None,
|
542
|
+
"profile_id": 101853,
|
543
|
+
"reinforce_hour": 18,
|
544
|
+
"services": [
|
545
|
+
{"name": "Moon Drill", "state": "online"},
|
546
|
+
],
|
547
|
+
"state": "shield_vulnerable",
|
548
|
+
"state_timer_end": dt.datetime(2020, 4, 5, 7, tzinfo=utc),
|
549
|
+
"state_timer_start": dt.datetime(
|
550
|
+
2020, 4, 5, 6, 30, tzinfo=utc
|
551
|
+
),
|
552
|
+
"structure_id": structure_id,
|
553
|
+
"system_id": solar_system_id,
|
554
|
+
"type_id": type_id,
|
555
|
+
"unanchors_at": dt.datetime(2020, 5, 5, 6, 30, tzinfo=utc),
|
556
|
+
},
|
557
|
+
],
|
558
|
+
},
|
559
|
+
),
|
560
|
+
EsiEndpoint(
|
561
|
+
"Universe",
|
562
|
+
"get_universe_structures_structure_id",
|
563
|
+
"structure_id",
|
564
|
+
needs_token=True,
|
565
|
+
data={
|
566
|
+
str(structure_id): {
|
567
|
+
"corporation_id": self.corporation_id,
|
568
|
+
"name": "Amamake - Mining",
|
569
|
+
"position": {
|
570
|
+
"x": 55028384780.0,
|
571
|
+
"y": 7310316270.0,
|
572
|
+
"z": -163686684205.0,
|
573
|
+
},
|
574
|
+
"solar_system_id": solar_system_id,
|
575
|
+
"type_id": type_id,
|
576
|
+
},
|
577
|
+
},
|
578
|
+
),
|
579
|
+
]
|
580
|
+
# given
|
581
|
+
mock_esi.client = EsiClientStub.create_from_endpoints(endpoints)
|
582
|
+
owner = OwnerFactory(user=self.user, structures_last_update_at=None)
|
583
|
+
moon = EveMoon.objects.get(id=EveMoonId.AMAMAKE_P2_M1)
|
584
|
+
# when
|
585
|
+
with patch(MODULE_PATH + ".EveSolarSystem.nearest_celestial") as m:
|
586
|
+
m.return_value = NearestCelestial(None, moon, 100)
|
587
|
+
owner.update_structures_esi()
|
588
|
+
# then
|
589
|
+
owner.refresh_from_db()
|
590
|
+
self.assertTrue(owner.is_structure_sync_fresh)
|
591
|
+
s = Structure.objects.get(id=structure_id)
|
592
|
+
self.assertEqual(s.name, "Mining")
|
593
|
+
self.assertEqual(s.eve_solar_system.id, EveSolarSystemId.AMAMAKE)
|
594
|
+
services = set(s.services.values_list("name", flat=True))
|
595
|
+
self.assertSetEqual({"Moon Drill"}, services)
|
596
|
+
self.assertEqual(s.eve_moon, moon)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from enum import IntEnum
|
2
|
+
|
3
|
+
|
4
|
+
class EveTypeId(IntEnum):
|
5
|
+
"""An EVE type ID."""
|
6
|
+
|
7
|
+
ASTRAHUS = 35832
|
8
|
+
ASTRAHUS_UPWELL_QUANTUM_CORE = 56201
|
9
|
+
ATHANOR = 35835
|
10
|
+
LIQUID_OZONE = 16273
|
11
|
+
METENOX = 81826
|
12
|
+
STANDUP_CLONING_CENTER_I = 35894
|
13
|
+
STANDUP_METENOX_MOON_DRILL = 82941
|
14
|
+
INTEGRATED_MOON_DRILL_ARMATURE = 81920
|
15
|
+
|
16
|
+
|
17
|
+
class EveMoonId(IntEnum):
|
18
|
+
AMAMAKE_P2_M1 = 40161465
|
19
|
+
|
20
|
+
|
21
|
+
class EveSolarSystemId(IntEnum):
|
22
|
+
AMAMAKE = 30002537
|
{aa_structures-2.15.0 → aa_structures-2.16.0}/structures/tests/testdata/create_eveuniverse.py
RENAMED
@@ -18,7 +18,7 @@ class CreateEveUniverseTestData(TestCase):
|
|
18
18
|
),
|
19
19
|
ModelSpec(
|
20
20
|
"EveCategory",
|
21
|
-
ids=[EveCategoryId.ORBITAL],
|
21
|
+
ids=[EveCategoryId.ORBITAL, EveCategoryId.STRUCTURE_MODULE],
|
22
22
|
include_children=True,
|
23
23
|
),
|
24
24
|
ModelSpec(
|
@@ -40,12 +40,10 @@ class CreateEveUniverseTestData(TestCase):
|
|
40
40
|
EveGroupId.FUEL_BLOCK,
|
41
41
|
EveGroupId.ICE_PRODUCT,
|
42
42
|
EveGroupId.QUANTUM_CORES,
|
43
|
-
EveGroupId.STRUCTURE_CITADEL_SERVICE_MODULE,
|
44
43
|
EveGroupId.UNCOMMON_MOON_ASTEROIDS,
|
45
44
|
],
|
46
45
|
include_children=True,
|
47
46
|
),
|
48
|
-
ModelSpec("EveType", ids=[], include_children=False),
|
49
47
|
ModelSpec(
|
50
48
|
"EveSolarSystem",
|
51
49
|
ids=[30002506, 31000005, 30002537, 30000474, 30000476],
|