aa-intel-tool 2.6.0__py3-none-any.whl → 2.6.2__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_intel_tool/__init__.py +1 -1
- aa_intel_tool/app_settings.py +15 -0
- aa_intel_tool/constants.py +6 -5
- aa_intel_tool/helper/eve_character.py +24 -36
- aa_intel_tool/helper/static_files.py +5 -4
- aa_intel_tool/locale/cs_CZ/LC_MESSAGES/django.po +15 -83
- aa_intel_tool/locale/de/LC_MESSAGES/django.mo +0 -0
- aa_intel_tool/locale/de/LC_MESSAGES/django.po +71 -87
- aa_intel_tool/locale/django.pot +16 -84
- aa_intel_tool/locale/es/LC_MESSAGES/django.po +19 -83
- aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
- aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po +72 -88
- aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po +15 -83
- aa_intel_tool/locale/ja/LC_MESSAGES/django.po +15 -83
- aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po +67 -83
- aa_intel_tool/locale/nl_NL/LC_MESSAGES/django.po +15 -83
- aa_intel_tool/locale/pl_PL/LC_MESSAGES/django.po +15 -83
- aa_intel_tool/locale/ru/LC_MESSAGES/django.mo +0 -0
- aa_intel_tool/locale/ru/LC_MESSAGES/django.po +71 -87
- aa_intel_tool/locale/sk/LC_MESSAGES/django.po +15 -83
- aa_intel_tool/locale/uk/LC_MESSAGES/django.mo +0 -0
- aa_intel_tool/locale/uk/LC_MESSAGES/django.po +71 -94
- aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po +20 -87
- aa_intel_tool/parser/general.py +11 -16
- aa_intel_tool/parser/helper/db.py +8 -11
- aa_intel_tool/parser/module/chatlist.py +97 -126
- aa_intel_tool/parser/module/dscan.py +115 -147
- aa_intel_tool/parser/module/fleetcomp.py +85 -102
- aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css +6 -24
- aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css +1 -1
- aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.js +104 -64
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.js +5 -5
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.js +43 -43
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.js +41 -17
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.js +51 -51
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.js +13 -7
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.js +53 -31
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js.map +1 -1
- aa_intel_tool/templates/aa_intel_tool/base.html +7 -42
- aa_intel_tool/templates/aa_intel_tool/partials/scan/evetime.html +1 -1
- aa_intel_tool/templatetags/aa_intel_tool.py +12 -7
- aa_intel_tool/tests/test-data/dscan.txt +250 -0
- aa_intel_tool/tests/test_admin.py +50 -38
- aa_intel_tool/tests/test_app_settings.py +23 -1
- aa_intel_tool/tests/test_helper_eve_character.py +405 -0
- aa_intel_tool/tests/test_models.py +188 -4
- aa_intel_tool/tests/test_parser_general.py +771 -0
- aa_intel_tool/tests/test_parser_module_chatlist.py +154 -0
- aa_intel_tool/tests/test_templatetags.py +24 -3
- {aa_intel_tool-2.6.0.dist-info → aa_intel_tool-2.6.2.dist-info}/METADATA +4 -4
- {aa_intel_tool-2.6.0.dist-info → aa_intel_tool-2.6.2.dist-info}/RECORD +65 -63
- aa_intel_tool/tests/test_parser.py +0 -135
- {aa_intel_tool-2.6.0.dist-info → aa_intel_tool-2.6.2.dist-info}/WHEEL +0 -0
- {aa_intel_tool-2.6.0.dist-info → aa_intel_tool-2.6.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{% extends "allianceauth/base-bs5.html" %}
|
|
2
2
|
|
|
3
3
|
{% load i18n %}
|
|
4
|
+
{% load aa_i18n %}
|
|
4
5
|
|
|
5
6
|
{% block page_title %}
|
|
6
7
|
{% translate "Intel Parser" %}
|
|
@@ -17,30 +18,19 @@
|
|
|
17
18
|
</div>
|
|
18
19
|
|
|
19
20
|
<div class="aa-intel-tool-body">
|
|
21
|
+
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
|
|
22
|
+
|
|
20
23
|
{% translate "Permalink successfully copied" as copyToClipboardSuccess %}
|
|
21
24
|
{% translate "Something went wrong. Nothing copied. Maybe your browser does not support this function." as copyToClipboardError %}
|
|
22
25
|
{% translate "Unaffiliated / No Alliance" as scanDataEmpty %}
|
|
23
26
|
{% translate "NPC Corp" as scanDataNpcCorp %}
|
|
24
|
-
{% translate "." context "Decimal separator" as decimalSeparator %}
|
|
25
|
-
{% translate "," context "Thousands separator" as thousandsSeparator %}
|
|
26
|
-
{% translate "No data available in this table" as emptyTable %}
|
|
27
|
-
{% translate "Showing _END_ entries" as info context "Keep _END_ as it is. It will be replaced by a number." %}
|
|
28
|
-
{% translate "(filtered from _MAX_ total entries)" as infoFiltered context "Keep _MAX_ as it is. It will be replaced by a number." %}
|
|
29
|
-
{% translate "No records available" as infoEmpty %}
|
|
30
|
-
{% translate "Loading …" as loadingRecords %}
|
|
31
|
-
{% translate "Processing …" as processing %}
|
|
32
|
-
{% translate "Nothing found, sorry …" as zeroRecords%}
|
|
33
|
-
{% translate "Search …" as searchPlaceholder %}
|
|
34
|
-
{% translate "First" as paginateFirst %}
|
|
35
|
-
{% translate "Last" as paginateLast %}
|
|
36
|
-
{% translate "Next" as paginateNext %}
|
|
37
|
-
{% translate "Previous" as paginatePrevious %}
|
|
38
|
-
{% translate ": activate to sort column ascending" as ariaSortAscending %}
|
|
39
|
-
{% translate ": activate to sort column descending" as ariaSortDescending %}
|
|
40
27
|
|
|
41
28
|
<script>
|
|
42
29
|
const aaIntelToolJsSettingsDefaults = {
|
|
43
|
-
language:
|
|
30
|
+
language: {
|
|
31
|
+
django: '{{ LANGUAGE_CODE }}',
|
|
32
|
+
dataTables: {url: '{{ DT_LANG_PATH }}'}
|
|
33
|
+
},
|
|
44
34
|
url: {},
|
|
45
35
|
translation: {
|
|
46
36
|
copyToClipboard: {
|
|
@@ -54,31 +44,6 @@
|
|
|
54
44
|
scanData: {
|
|
55
45
|
empty: '{{ scanDataEmpty|escapejs }}',
|
|
56
46
|
npcCorp: '{{ scanDataNpcCorp|escapejs }}',
|
|
57
|
-
},
|
|
58
|
-
dataTables: {
|
|
59
|
-
decimal: '{{ decimalSeparator|escapejs }}',
|
|
60
|
-
thousands: '{{ thousandsSeparator|escapejs }}',
|
|
61
|
-
emptyTable: '{{ emptyTable|escapejs }}',
|
|
62
|
-
info: '{{ info|escapejs }}',
|
|
63
|
-
infoFiltered: '{{ infoFiltered|escapejs }}',
|
|
64
|
-
infoEmpty: '{{ infoEmpty|escapejs }}',
|
|
65
|
-
infoPostFix: '',
|
|
66
|
-
lengthMenu: '_MENU_',
|
|
67
|
-
loadingRecords: '{{ loadingRecords|escapejs }}',
|
|
68
|
-
processing: '{{ processing|escapejs }}',
|
|
69
|
-
zeroRecords: '{{ zeroRecords|escapejs }}',
|
|
70
|
-
search: '_INPUT_',
|
|
71
|
-
searchPlaceholder: '{{ searchPlaceholder|escapejs }}',
|
|
72
|
-
paginate: {
|
|
73
|
-
first: '{{ paginateFirst|escapejs }}',
|
|
74
|
-
last: '{{ paginateLast|escapejs }}',
|
|
75
|
-
next: '{{ paginateNext|escapejs }}',
|
|
76
|
-
previous: '{{ paginatePrevious|escapejs }}'
|
|
77
|
-
},
|
|
78
|
-
aria: {
|
|
79
|
-
sortAscending: '{{ ariaSortAscending|escapejs }}',
|
|
80
|
-
sortDescending: '{{ ariaSortDescending|escapejs }}'
|
|
81
|
-
}
|
|
82
47
|
}
|
|
83
48
|
}
|
|
84
49
|
}
|
|
@@ -6,7 +6,6 @@ Versioned static URLs to break browser caches when changing the app version
|
|
|
6
6
|
import os
|
|
7
7
|
|
|
8
8
|
# Django
|
|
9
|
-
from django.conf import settings
|
|
10
9
|
from django.template.defaulttags import register
|
|
11
10
|
from django.templatetags.static import static
|
|
12
11
|
from django.utils.safestring import mark_safe
|
|
@@ -19,6 +18,8 @@ from app_utils.logging import LoggerAddTag
|
|
|
19
18
|
|
|
20
19
|
# AA Intel Tool
|
|
21
20
|
from aa_intel_tool import __title__, __version__
|
|
21
|
+
from aa_intel_tool.app_settings import debug_enabled
|
|
22
|
+
from aa_intel_tool.constants import PACKAGE_NAME
|
|
22
23
|
from aa_intel_tool.helper.static_files import calculate_integrity_hash
|
|
23
24
|
|
|
24
25
|
logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__)
|
|
@@ -31,7 +32,7 @@ def aa_intel_tool_static(
|
|
|
31
32
|
"""
|
|
32
33
|
Versioned static URL
|
|
33
34
|
|
|
34
|
-
:param relative_file_path: The file path relative to the `
|
|
35
|
+
:param relative_file_path: The file path relative to the `{APP_NAME}/{PACKAGE_NAME}/static/{PACKAGE_NAME}` folder
|
|
35
36
|
:type relative_file_path: str
|
|
36
37
|
:param script_type: The script type
|
|
37
38
|
:type script_type: str
|
|
@@ -49,13 +50,13 @@ def aa_intel_tool_static(
|
|
|
49
50
|
if file_type not in ["css", "js"]:
|
|
50
51
|
raise ValueError(f"Unsupported file type: {file_type}")
|
|
51
52
|
|
|
52
|
-
static_file_path = os.path.join(
|
|
53
|
+
static_file_path = os.path.join(PACKAGE_NAME, relative_file_path)
|
|
53
54
|
static_url = static(static_file_path)
|
|
54
55
|
|
|
55
56
|
# Integrity hash calculation only for non-debug mode
|
|
56
57
|
sri_string = (
|
|
57
58
|
f' integrity="{calculate_integrity_hash(relative_file_path)}" crossorigin="anonymous"'
|
|
58
|
-
if not
|
|
59
|
+
if not debug_enabled()
|
|
59
60
|
else ""
|
|
60
61
|
)
|
|
61
62
|
|
|
@@ -68,16 +69,20 @@ def aa_intel_tool_static(
|
|
|
68
69
|
else static_url + "?v=" + __version__
|
|
69
70
|
)
|
|
70
71
|
|
|
72
|
+
return_value = None
|
|
73
|
+
|
|
71
74
|
# Return the versioned URL with integrity hash for CSS
|
|
72
75
|
if file_type == "css":
|
|
73
|
-
|
|
76
|
+
return_value = mark_safe(
|
|
77
|
+
f'<link rel="stylesheet" href="{versioned_url}"{sri_string}>'
|
|
78
|
+
)
|
|
74
79
|
|
|
75
80
|
# Return the versioned URL with integrity hash for JS files
|
|
76
81
|
if file_type == "js":
|
|
77
82
|
js_type = f' type="{script_type}"' if script_type else ""
|
|
78
83
|
|
|
79
|
-
|
|
84
|
+
return_value = mark_safe(
|
|
80
85
|
f'<script{js_type} src="{versioned_url}"{sri_string}></script>'
|
|
81
86
|
)
|
|
82
87
|
|
|
83
|
-
return
|
|
88
|
+
return return_value
|
|
@@ -43,3 +43,253 @@
|
|
|
43
43
|
32880 MAPDAVISs Venture Venture -
|
|
44
44
|
32880 Jack Rosca's Venture Venture 355 km
|
|
45
45
|
23913 Your Mother Nyx 355 km
|
|
46
|
+
11393 balls deep Retribution 5,115 m
|
|
47
|
+
11393 Power Prawn Retribution 19 km
|
|
48
|
+
47466 la judia verde Praxis 187 km
|
|
49
|
+
35834 C-N4OD - Fountain of Life Keepstar 0 m
|
|
50
|
+
12747 musty pit Mastodon 13 km
|
|
51
|
+
35826 C-N4OD - Daystrom Institute Azbel 4,624 km
|
|
52
|
+
35827 C-N4OD - Kuat Drive Yards Sotiyo 3,320 km
|
|
53
|
+
35825 C-N4OD - Asgard Invention Raitaru 5,797 km
|
|
54
|
+
11969 i.Dreamcatcher Point Arazu 21 km
|
|
55
|
+
11957 Falcon Falcon 55 km
|
|
56
|
+
11963 Mermaid Guide Rapier 59 km
|
|
57
|
+
81040 Avalanche - Pampel Avalanche 3,404 km
|
|
58
|
+
81040 Avalanche - Axn0r Avalanche 3,404 km
|
|
59
|
+
12005 Master Baiter Ishtar 18 km
|
|
60
|
+
22456 B2 Sabre 1,125 km
|
|
61
|
+
33474 Test subject Mobile Depot 2,032 km
|
|
62
|
+
35836 C-N4OD - Khazad-dum Refinery Tatara 2,134 km
|
|
63
|
+
11129 Gallente Shuttle - Meyer Wolfsheim Gallente Shuttle -
|
|
64
|
+
3874 KVN-36 Stargate (Gallente Constellation) 1,124 km
|
|
65
|
+
11567 Aimbulance Avatar 34 km
|
|
66
|
+
35841 C-N4OD » J5A-IX - Der Geile Springen Ansiblex Jump Bridge 2,748 km
|
|
67
|
+
11400 I need! Jaguar -
|
|
68
|
+
670 Nancy Keikira's Capsule Capsule -
|
|
69
|
+
27540 Modro Titty bar II Domination Control Tower -
|
|
70
|
+
27786 True Sansha Control Tower True Sansha Control Tower 0 m
|
|
71
|
+
20066 Minmatar Control Tower Small Minmatar Control Tower Small -
|
|
72
|
+
20064 POS ça là Gallente Control Tower Small -
|
|
73
|
+
20063 DBRN-Z Star Gallente Control Tower Medium -
|
|
74
|
+
12236 Советский Союз Gallente Control Tower -
|
|
75
|
+
20063 Gallente Control Tower Medium Gallente Control Tower Medium -
|
|
76
|
+
35826 DBRN-Z - Nebula Processing Copy+Research Azbel 11.6 AU
|
|
77
|
+
35826 DBRN-Z - Dear Mr. BuRNZ Large Ships Azbel 11.6 AU
|
|
78
|
+
35825 DBRN-Z - Wifi Inside - Invent & Equipment Raitaru 11.6 AU
|
|
79
|
+
85230 Mercenary Den Mercenary Den -
|
|
80
|
+
33474 Mobile Depot Mobile Depot -
|
|
81
|
+
33475 Mobile Tractor Unit Mobile Tractor Unit -
|
|
82
|
+
35835 DBRN-Z - Private DBRN Fletch 2 ZS Athanor 12.6 AU
|
|
83
|
+
35835 DBRN-Z - PRIVATE - Tomtenisse2 Athanor 12.8 AU
|
|
84
|
+
35836 DBRN-Z - Hard Rocks Cafe Tatara 11.6 AU
|
|
85
|
+
81080 Orbital Skyhook Orbital Skyhook 11.6 AU
|
|
86
|
+
81080 Orbital Skyhook Orbital Skyhook 10.3 AU
|
|
87
|
+
81080 Orbital Skyhook Orbital Skyhook 6.2 AU
|
|
88
|
+
81080 Orbital Skyhook Orbital Skyhook 157,429 km
|
|
89
|
+
81080 Orbital Skyhook Orbital Skyhook 12.8 AU
|
|
90
|
+
81080 Orbital Skyhook Orbital Skyhook 11.8 AU
|
|
91
|
+
81080 Orbital Skyhook Orbital Skyhook 11.2 AU
|
|
92
|
+
81080 Orbital Skyhook Orbital Skyhook 11.2 AU
|
|
93
|
+
81080 Orbital Skyhook Orbital Skyhook 12.6 AU
|
|
94
|
+
32458 Sovereignty Hub Sovereignty Hub 11.1 AU
|
|
95
|
+
45039 DBRN-Z - Star Sun M0 (Orange radiant) 11.1 AU
|
|
96
|
+
23913 'παναγια σουμελα' Nyx -
|
|
97
|
+
81826 DBRN-Z - safari safari v2 Metenox Moon Drill 6.2 AU
|
|
98
|
+
27540 Modro Titty bar II Domination Control Tower -
|
|
99
|
+
27786 True Sansha Control Tower True Sansha Control Tower 0 m
|
|
100
|
+
20066 Minmatar Control Tower Small Minmatar Control Tower Small -
|
|
101
|
+
20064 POS ça là Gallente Control Tower Small -
|
|
102
|
+
20063 DBRN-Z Star Gallente Control Tower Medium -
|
|
103
|
+
12236 Советский Союз Gallente Control Tower -
|
|
104
|
+
20063 Gallente Control Tower Medium Gallente Control Tower Medium -
|
|
105
|
+
17621 Corporate Hangar Array Corporate Hangar Array -
|
|
106
|
+
17621 Corporate Hangar Array Corporate Hangar Array -
|
|
107
|
+
17176 Spatial Destabilization Battery Spatial Destabilization Battery -
|
|
108
|
+
17177 White Noise Generation Battery White Noise Generation Battery -
|
|
109
|
+
17175 Phase Inversion Battery Phase Inversion Battery -
|
|
110
|
+
17174 Ion Field Projection Battery Ion Field Projection Battery -
|
|
111
|
+
17174 Ion Field Projection Battery Ion Field Projection Battery -
|
|
112
|
+
17175 Phase Inversion Battery Phase Inversion Battery -
|
|
113
|
+
17174 Ion Field Projection Battery Ion Field Projection Battery -
|
|
114
|
+
17174 Ion Field Projection Battery Ion Field Projection Battery -
|
|
115
|
+
17175 Phase Inversion Battery Phase Inversion Battery -
|
|
116
|
+
27672 Energy Neutralizing Battery Energy Neutralizing Battery -
|
|
117
|
+
27672 Energy Neutralizing Battery Energy Neutralizing Battery -
|
|
118
|
+
27855 Sansha Energy Neutralizing Battery Sansha Energy Neutralizing Battery -
|
|
119
|
+
27672 Energy Neutralizing Battery Energy Neutralizing Battery -
|
|
120
|
+
27855 Sansha Energy Neutralizing Battery Sansha Energy Neutralizing Battery -
|
|
121
|
+
27672 Energy Neutralizing Battery Energy Neutralizing Battery -
|
|
122
|
+
27672 Energy Neutralizing Battery Energy Neutralizing Battery -
|
|
123
|
+
27672 Energy Neutralizing Battery Energy Neutralizing Battery -
|
|
124
|
+
35826 DBRN-Z - Nebula Processing Copy+Research Azbel 11.6 AU
|
|
125
|
+
35826 DBRN-Z - Dear Mr. BuRNZ Large Ships Azbel 11.6 AU
|
|
126
|
+
35825 DBRN-Z - Wifi Inside - Invent & Equipment Raitaru 11.6 AU
|
|
127
|
+
85230 Mercenary Den Mercenary Den -
|
|
128
|
+
33474 Mobile Depot Mobile Depot -
|
|
129
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
130
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
131
|
+
16690 Small Railgun Battery Small Railgun Battery -
|
|
132
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
133
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
134
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
135
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
136
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
137
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
138
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
139
|
+
16690 Small Railgun Battery Small Railgun Battery -
|
|
140
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
141
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
142
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
143
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
144
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
145
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
146
|
+
16690 Small Railgun Battery Small Railgun Battery -
|
|
147
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
148
|
+
16690 Small Railgun Battery Small Railgun Battery -
|
|
149
|
+
16690 Small Railgun Battery Small Railgun Battery -
|
|
150
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
151
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
152
|
+
16690 Small Railgun Battery Small Railgun Battery -
|
|
153
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
154
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
155
|
+
16691 Medium Railgun Battery Medium Railgun Battery -
|
|
156
|
+
27633 Dark Blood Small Beam Laser Battery Dark Blood Small Beam Laser Battery 40 km
|
|
157
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 42 km
|
|
158
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 49 km
|
|
159
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 43 km
|
|
160
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 44 km
|
|
161
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 51 km
|
|
162
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 43 km
|
|
163
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 44 km
|
|
164
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 45 km
|
|
165
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 39 km
|
|
166
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 42 km
|
|
167
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 43 km
|
|
168
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 40 km
|
|
169
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 39 km
|
|
170
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 40 km
|
|
171
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 46 km
|
|
172
|
+
27771 Sansha Small Pulse Laser Battery Sansha Small Pulse Laser Battery -
|
|
173
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 47 km
|
|
174
|
+
27771 Sansha Small Pulse Laser Battery Sansha Small Pulse Laser Battery -
|
|
175
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 42 km
|
|
176
|
+
27633 Dark Blood Small Beam Laser Battery Dark Blood Small Beam Laser Battery 38 km
|
|
177
|
+
27633 Dark Blood Small Beam Laser Battery Dark Blood Small Beam Laser Battery 50 km
|
|
178
|
+
27633 Dark Blood Small Beam Laser Battery Dark Blood Small Beam Laser Battery 42 km
|
|
179
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 48 km
|
|
180
|
+
27771 Sansha Small Pulse Laser Battery Sansha Small Pulse Laser Battery -
|
|
181
|
+
27771 Sansha Small Pulse Laser Battery Sansha Small Pulse Laser Battery -
|
|
182
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 40 km
|
|
183
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 45 km
|
|
184
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 40 km
|
|
185
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 48 km
|
|
186
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 45 km
|
|
187
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 40 km
|
|
188
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 39 km
|
|
189
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 38 km
|
|
190
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 39 km
|
|
191
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 43 km
|
|
192
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 45 km
|
|
193
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 41 km
|
|
194
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 42 km
|
|
195
|
+
27777 True Sansha Small Pulse Laser Battery True Sansha Small Pulse Laser Battery 41 km
|
|
196
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 45 km
|
|
197
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 40 km
|
|
198
|
+
27775 True Sansha Medium Pulse Laser Battery True Sansha Medium Pulse Laser Battery 39 km
|
|
199
|
+
27776 True Sansha Small Beam Laser Battery True Sansha Small Beam Laser Battery 43 km
|
|
200
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
201
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
202
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
203
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
204
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
205
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
206
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
207
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
208
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
209
|
+
16696 Cruise Missile Battery Cruise Missile Battery -
|
|
210
|
+
27646 Domination Medium Artillery Battery Domination Medium Artillery Battery -
|
|
211
|
+
27646 Domination Medium Artillery Battery Domination Medium Artillery Battery -
|
|
212
|
+
27646 Domination Medium Artillery Battery Domination Medium Artillery Battery -
|
|
213
|
+
27652 Domination Small Artillery Battery Domination Small Artillery Battery -
|
|
214
|
+
27649 Domination Medium AutoCannon Battery Domination Medium AutoCannon Battery -
|
|
215
|
+
27652 Domination Small Artillery Battery Domination Small Artillery Battery -
|
|
216
|
+
27559 Domination Large Artillery Battery Domination Large Artillery Battery -
|
|
217
|
+
27559 Domination Large Artillery Battery Domination Large Artillery Battery -
|
|
218
|
+
27652 Domination Small Artillery Battery Domination Small Artillery Battery -
|
|
219
|
+
27649 Domination Medium AutoCannon Battery Domination Medium AutoCannon Battery -
|
|
220
|
+
27649 Domination Medium AutoCannon Battery Domination Medium AutoCannon Battery -
|
|
221
|
+
27649 Domination Medium AutoCannon Battery Domination Medium AutoCannon Battery -
|
|
222
|
+
27652 Domination Small Artillery Battery Domination Small Artillery Battery -
|
|
223
|
+
27652 Domination Small Artillery Battery Domination Small Artillery Battery -
|
|
224
|
+
27559 Domination Large Artillery Battery Domination Large Artillery Battery -
|
|
225
|
+
27646 Domination Medium Artillery Battery Domination Medium Artillery Battery -
|
|
226
|
+
27652 Domination Small Artillery Battery Domination Small Artillery Battery -
|
|
227
|
+
27559 Domination Large Artillery Battery Domination Large Artillery Battery -
|
|
228
|
+
33475 Mobile Tractor Unit Mobile Tractor Unit -
|
|
229
|
+
35835 DBRN-Z - Private DBRN Fletch 2 ZS Athanor 12.6 AU
|
|
230
|
+
35835 DBRN-Z - PRIVATE - Tomtenisse2 Athanor 12.8 AU
|
|
231
|
+
35836 DBRN-Z - Hard Rocks Cafe Tatara 11.6 AU
|
|
232
|
+
27779 Shadow Sensor Dampening Battery Shadow Sensor Dampening Battery -
|
|
233
|
+
27779 Shadow Sensor Dampening Battery Shadow Sensor Dampening Battery -
|
|
234
|
+
27779 Shadow Sensor Dampening Battery Shadow Sensor Dampening Battery -
|
|
235
|
+
27779 Shadow Sensor Dampening Battery Shadow Sensor Dampening Battery -
|
|
236
|
+
17186 Heat Dissipation Array Heat Dissipation Array -
|
|
237
|
+
17186 Heat Dissipation Array Heat Dissipation Array 13 km
|
|
238
|
+
17187 Photon Scattering Array Photon Scattering Array 14 km
|
|
239
|
+
17186 Heat Dissipation Array Heat Dissipation Array 14 km
|
|
240
|
+
17185 Explosion Dampening Array Explosion Dampening Array -
|
|
241
|
+
17187 Photon Scattering Array Photon Scattering Array 14 km
|
|
242
|
+
17187 Photon Scattering Array Photon Scattering Array 14 km
|
|
243
|
+
17187 Photon Scattering Array Photon Scattering Array -
|
|
244
|
+
17186 Heat Dissipation Array Heat Dissipation Array 14 km
|
|
245
|
+
17187 Photon Scattering Array Photon Scattering Array -
|
|
246
|
+
12237 Ship Maintenance Array Ship Maintenance Array -
|
|
247
|
+
12237 Ship Maintenance Array Ship Maintenance Array -
|
|
248
|
+
81080 Orbital Skyhook Orbital Skyhook 11.6 AU
|
|
249
|
+
81080 Orbital Skyhook Orbital Skyhook 10.3 AU
|
|
250
|
+
81080 Orbital Skyhook Orbital Skyhook 6.2 AU
|
|
251
|
+
81080 Orbital Skyhook Orbital Skyhook 157,428 km
|
|
252
|
+
81080 Orbital Skyhook Orbital Skyhook 12.8 AU
|
|
253
|
+
81080 Orbital Skyhook Orbital Skyhook 11.8 AU
|
|
254
|
+
81080 Orbital Skyhook Orbital Skyhook 11.2 AU
|
|
255
|
+
81080 Orbital Skyhook Orbital Skyhook 11.2 AU
|
|
256
|
+
81080 Orbital Skyhook Orbital Skyhook 12.6 AU
|
|
257
|
+
32458 Sovereignty Hub Sovereignty Hub 11.1 AU
|
|
258
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 41 km
|
|
259
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
260
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 44 km
|
|
261
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 45 km
|
|
262
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 51 km
|
|
263
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 46 km
|
|
264
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 43 km
|
|
265
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
266
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
267
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 45 km
|
|
268
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery 39 km
|
|
269
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
270
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
271
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
272
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
273
|
+
17178 Stasis Webification Battery Stasis Webification Battery -
|
|
274
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery -
|
|
275
|
+
27573 Domination Stasis Webification Battery Domination Stasis Webification Battery -
|
|
276
|
+
45039 DBRN-Z - Star Sun M0 (Orange radiant) 11.1 AU
|
|
277
|
+
81826 DBRN-Z - safari safari v2 Metenox Moon Drill 6.2 AU
|
|
278
|
+
17181 Warp Disruption Battery Warp Disruption Battery -
|
|
279
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery -
|
|
280
|
+
27569 Shadow Warp Scrambling Battery Shadow Warp Scrambling Battery -
|
|
281
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery 40 km
|
|
282
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery -
|
|
283
|
+
17181 Warp Disruption Battery Warp Disruption Battery 46 km
|
|
284
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery 41 km
|
|
285
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery -
|
|
286
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery -
|
|
287
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery -
|
|
288
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery -
|
|
289
|
+
17181 Warp Disruption Battery Warp Disruption Battery -
|
|
290
|
+
17182 Warp Scrambling Battery Warp Scrambling Battery 45 km
|
|
291
|
+
17181 Warp Disruption Battery Warp Disruption Battery 50 km
|
|
292
|
+
27569 Shadow Warp Scrambling Battery Shadow Warp Scrambling Battery -
|
|
293
|
+
17181 Warp Disruption Battery Warp Disruption Battery -
|
|
294
|
+
17181 Warp Disruption Battery Warp Disruption Battery 42 km
|
|
295
|
+
17181 Warp Disruption Battery Warp Disruption Battery 44 km
|
|
@@ -3,84 +3,96 @@ Test for admin.py
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
# Django
|
|
6
|
-
from django.
|
|
6
|
+
from django.contrib import admin
|
|
7
|
+
from django.test import RequestFactory, TestCase
|
|
7
8
|
from django.urls import reverse
|
|
8
9
|
|
|
9
|
-
# Alliance Auth (External Libs)
|
|
10
|
-
from app_utils.testing import create_fake_user
|
|
11
|
-
|
|
12
10
|
# AA Intel Tool
|
|
13
|
-
from aa_intel_tool.admin import BaseReadOnlyAdminMixin
|
|
11
|
+
from aa_intel_tool.admin import BaseReadOnlyAdminMixin, ScanAdmin
|
|
12
|
+
from aa_intel_tool.models import Scan
|
|
14
13
|
|
|
15
14
|
|
|
16
|
-
class
|
|
15
|
+
class TestBaseReadOnlyAdminMixin(TestCase):
|
|
17
16
|
"""
|
|
18
|
-
|
|
17
|
+
Test the BaseReadOnlyAdminMixin class
|
|
19
18
|
"""
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
def setUpClass(cls) -> None:
|
|
23
|
-
"""
|
|
24
|
-
Set up groups and users
|
|
20
|
+
def test_add_permission_is_denied(self):
|
|
25
21
|
"""
|
|
22
|
+
Test if admin.BaseReadOnlyAdminMixin.has_add_permission returns False
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
:return:
|
|
25
|
+
:rtype:
|
|
26
|
+
"""
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
character_id=1001, character_name="Peter Parker"
|
|
28
|
+
request = RequestFactory().get(
|
|
29
|
+
path=reverse(viewname="aa_intel_tool:intel_tool_index")
|
|
32
30
|
)
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
self.assertFalse(BaseReadOnlyAdminMixin.has_add_permission(request))
|
|
33
|
+
|
|
34
|
+
def test_change_permission_is_denied(self):
|
|
35
35
|
"""
|
|
36
|
-
Test if admin.BaseReadOnlyAdminMixin.
|
|
36
|
+
Test if admin.BaseReadOnlyAdminMixin.has_change_permission returns False
|
|
37
37
|
|
|
38
38
|
:return:
|
|
39
39
|
:rtype:
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
response = self.client.get(
|
|
42
|
+
request = RequestFactory().get(
|
|
45
43
|
path=reverse(viewname="aa_intel_tool:intel_tool_index")
|
|
46
44
|
)
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
self.assertFalse(expr=has_permission)
|
|
46
|
+
self.assertFalse(BaseReadOnlyAdminMixin.has_change_permission(request))
|
|
51
47
|
|
|
52
|
-
def
|
|
48
|
+
def test_delete_permission_is_denied(self):
|
|
53
49
|
"""
|
|
54
|
-
Test if admin.BaseReadOnlyAdminMixin.
|
|
50
|
+
Test if admin.BaseReadOnlyAdminMixin.has_delete_permission returns False
|
|
55
51
|
|
|
56
52
|
:return:
|
|
57
53
|
:rtype:
|
|
58
54
|
"""
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
response = self.client.get(
|
|
56
|
+
request = RequestFactory().get(
|
|
63
57
|
path=reverse(viewname="aa_intel_tool:intel_tool_index")
|
|
64
58
|
)
|
|
65
59
|
|
|
66
|
-
|
|
60
|
+
self.assertFalse(BaseReadOnlyAdminMixin.has_delete_permission(request))
|
|
67
61
|
|
|
68
|
-
self.assertFalse(expr=has_permission)
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
class TestScanAdmin(TestCase):
|
|
64
|
+
"""
|
|
65
|
+
Test the ScanAdmin class
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
def test_displays_scan_type_with_link(self):
|
|
71
69
|
"""
|
|
72
|
-
Test if
|
|
70
|
+
Test if ScanAdmin._scan_type displays the scan type with a link
|
|
73
71
|
|
|
74
72
|
:return:
|
|
75
73
|
:rtype:
|
|
76
74
|
"""
|
|
77
75
|
|
|
78
|
-
|
|
76
|
+
scan = Scan(raw_data="test data")
|
|
77
|
+
scan.save()
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
admin_instance = ScanAdmin(model=Scan, admin_site=admin.site)
|
|
80
|
+
result = admin_instance._scan_type(scan)
|
|
81
|
+
|
|
82
|
+
self.assertIn("Open in a new browser tab", result)
|
|
83
|
+
self.assertIn(scan.hash, result)
|
|
84
|
+
|
|
85
|
+
def test_displays_raw_data_in_pre_tag(self):
|
|
86
|
+
"""
|
|
87
|
+
Test if ScanAdmin._raw_data displays the raw data in a <pre> tag
|
|
88
|
+
|
|
89
|
+
:return:
|
|
90
|
+
:rtype:
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
scan = Scan.objects.create(raw_data="test data")
|
|
83
94
|
|
|
84
|
-
|
|
95
|
+
admin_instance = ScanAdmin(model=Scan, admin_site=admin.site)
|
|
96
|
+
result = admin_instance._raw_data(scan)
|
|
85
97
|
|
|
86
|
-
self.
|
|
98
|
+
self.assertIn("<pre>test data</pre>", result)
|
|
@@ -10,7 +10,7 @@ from django.conf import settings
|
|
|
10
10
|
from django.test import TestCase, override_settings
|
|
11
11
|
|
|
12
12
|
# AA Intel Tool
|
|
13
|
-
from aa_intel_tool.app_settings import AppSettings
|
|
13
|
+
from aa_intel_tool.app_settings import AppSettings, debug_enabled
|
|
14
14
|
|
|
15
15
|
SETTINGS_PATH = "aa_intel_tool.app_settings"
|
|
16
16
|
|
|
@@ -105,3 +105,25 @@ class TestAppSettings(TestCase):
|
|
|
105
105
|
expected_grid_size = 1000
|
|
106
106
|
|
|
107
107
|
self.assertEqual(first=grid_size, second=expected_grid_size)
|
|
108
|
+
|
|
109
|
+
@override_settings(DEBUG=True)
|
|
110
|
+
def test_debug_enabled_with_debug_true(self) -> None:
|
|
111
|
+
"""
|
|
112
|
+
Test debug_enabled with DEBUG = True
|
|
113
|
+
|
|
114
|
+
:return:
|
|
115
|
+
:rtype:
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
self.assertTrue(debug_enabled())
|
|
119
|
+
|
|
120
|
+
@override_settings(DEBUG=False)
|
|
121
|
+
def test_debug_enabled_with_debug_false(self) -> None:
|
|
122
|
+
"""
|
|
123
|
+
Test debug_enabled with DEBUG = False
|
|
124
|
+
|
|
125
|
+
:return:
|
|
126
|
+
:rtype:
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
self.assertFalse(debug_enabled())
|