aa-fleetfinder 2.4.0__py3-none-any.whl → 2.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aa-fleetfinder might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aa-fleetfinder
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: Fleet finder plugin for Alliance Auth
5
5
  Project-URL: Changelog, https://github.com/ppfeufer/aa-fleetfinder/blob/master/CHANGELOG.md
6
6
  Project-URL: Documentation, https://github.com/ppfeufer/aa-fleetfinder/blob/master/README.md
@@ -702,6 +702,7 @@ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
702
702
  Requires-Python: >=3.10
703
703
  Requires-Dist: allianceauth-app-utils>=1.14.2
704
704
  Requires-Dist: allianceauth<5,>=4.6
705
+ Requires-Dist: django-esi>=7.0.1
705
706
  Provides-Extra: tests-allianceauth-latest
706
707
  Requires-Dist: coverage; extra == 'tests-allianceauth-latest'
707
708
  Requires-Dist: django-webtest; extra == 'tests-allianceauth-latest'
@@ -1,10 +1,9 @@
1
- fleetfinder/__init__.py,sha256=OQvE5artc_nBFw4SUqE4xrjhS3q700-mFsTPrVjU6Bg,197
1
+ fleetfinder/__init__.py,sha256=l-QO_UtEsVDQ2c0k6Tq3LXApixl1aVNv0lqXYMMYkI8,415
2
2
  fleetfinder/app_settings.py,sha256=XE5oZFg2Vhn5OYQFehoOwjgVgKAvXcyj5NGmrbr3bk8,261
3
3
  fleetfinder/apps.py,sha256=5t6R6HS_2cK3oCtTomvOM0dagt4sQkbnIWBhxT8dHrw,448
4
4
  fleetfinder/auth_hooks.py,sha256=_oHqIEfTFDB1lsVAOrEGCc6aLiLpRtjcPw7CdLNSdKw,1234
5
- fleetfinder/constants.py,sha256=apKYhl8Wu9pvifDXr4fU9wAb-1SpB7NhpBc_DJNPe5U,601
6
5
  fleetfinder/models.py,sha256=MEqsa-gRzFlCoU5awPwlLUzJ_2A2sNo9cPtfT-hVCNU,2805
7
- fleetfinder/providers.py,sha256=R6cy9MAxPw8AcZuIQwpQ1Knv13ItWCBCAspnJ_G30_U,205
6
+ fleetfinder/providers.py,sha256=Je9FZvALV1ARn_34yllhztl5nG3tT7y1ri7utFHwO_o,298
8
7
  fleetfinder/tasks.py,sha256=pqDMPHFMXej4dPrf8fxucuYKtj9JPlActiNPIc4eAAQ,10969
9
8
  fleetfinder/urls.py,sha256=oL6zOnvQaGXFp-mOhsL9C_jU16YSPMAXUBM8s2_m4_U,1128
10
9
  fleetfinder/views.py,sha256=cWjkmZACn2lS1aSxnxC7qm_a2G-9U4x-6dzIfJID_K0,9723
@@ -66,8 +65,9 @@ fleetfinder/tests/test_access.py,sha256=rQAfeEre2CmCszFTLV_53HK7m5Odq7ZqACJ3kced
66
65
  fleetfinder/tests/test_auth_hooks.py,sha256=XEB0LJmxxJCDlYhxKzcRiEHYrn1k_NkShrDGV_bcweg,2174
67
66
  fleetfinder/tests/test_settings.py,sha256=CuarOzsrkoMx7dmqolsnhnuhis7N10GaOULo6KYIl7k,710
68
67
  fleetfinder/tests/test_templatetags.py,sha256=lIe1X0TCuFwWcgsqZw4VGQLgqMsqEjNbPwqhtD8c4Qk,1414
68
+ fleetfinder/tests/test_user_agent.py,sha256=sqKr_2IXoqULgqmFqoNV8fUR2Xv9QkA7On0Ae0FRuM8,1003
69
69
  fleetfinder/tests/utils.py,sha256=ynwH67jb14UFi6hpLAXe_FcYdQcjET_sxuUylWPNpnk,1451
70
- aa_fleetfinder-2.4.0.dist-info/METADATA,sha256=b_Tz-FDe1lEF5UCNF4KR40G4dk4BgyEIPtdhrK6SNAU,48063
71
- aa_fleetfinder-2.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
- aa_fleetfinder-2.4.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
73
- aa_fleetfinder-2.4.0.dist-info/RECORD,,
70
+ aa_fleetfinder-2.5.0.dist-info/METADATA,sha256=dtRh2Ymgqhg1dgsurzH3smJFXsfEN1HgdD13cy9-U54,48096
71
+ aa_fleetfinder-2.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
+ aa_fleetfinder-2.5.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
73
+ aa_fleetfinder-2.5.0.dist-info/RECORD,,
fleetfinder/__init__.py CHANGED
@@ -5,6 +5,13 @@ Initialize the app
5
5
  # Django
6
6
  from django.utils.translation import gettext_lazy as _
7
7
 
8
- __version__ = "2.4.0"
8
+ __version__ = "2.5.0"
9
9
  __title__ = _("Fleet Finder")
10
10
  __verbose_name__ = "Fleet Finder for Alliance Auth"
11
+
12
+ __package_name__ = "aa-fleetfinder"
13
+ __app_name__ = "fleetfinder"
14
+ __app_name_verbose__ = "AA Fleet Finder"
15
+ __app_name_useragent__ = "AA-Fleet-Finder"
16
+
17
+ __github_url__ = f"https://github.com/ppfeufer/{__package_name__}"
fleetfinder/providers.py CHANGED
@@ -6,7 +6,9 @@ Providers
6
6
  from esi.clients import EsiClientProvider
7
7
 
8
8
  # AA Fleet Finder
9
- from fleetfinder.constants import USER_AGENT
9
+ from fleetfinder import __app_name_useragent__, __github_url__, __version__
10
10
 
11
11
  # ESI client
12
- esi = EsiClientProvider(app_info_text=USER_AGENT)
12
+ esi = EsiClientProvider(
13
+ ua_appname=__app_name_useragent__, ua_version=__version__, ua_url=__github_url__
14
+ )
@@ -0,0 +1,40 @@
1
+ """
2
+ Test user agent header for ESI requests
3
+ """
4
+
5
+ # Django
6
+ from django.conf import settings
7
+ from django.test import TestCase
8
+
9
+ # Alliance Auth
10
+ from esi import __url__ as esi_url
11
+ from esi import __version__ as esi_version
12
+
13
+ # AA Fleet Finder
14
+ from fleetfinder import __app_name_useragent__, __github_url__, __version__
15
+ from fleetfinder.providers import esi
16
+
17
+
18
+ class TestUserAgent(TestCase):
19
+ """
20
+ Test the user agent header for ESI requests
21
+ """
22
+
23
+ def test_user_agent_header(self):
24
+ """
25
+ Test that the user agent header is set correctly for ESI requests.
26
+
27
+ :return:
28
+ :rtype:
29
+ """
30
+
31
+ operation = esi.client.Universe.get_universe_factions()
32
+
33
+ self.assertEqual(
34
+ operation.future.request.headers["User-Agent"],
35
+ (
36
+ f"{__app_name_useragent__}/{__version__} "
37
+ f"({settings.ESI_USER_CONTACT_EMAIL}; +{__github_url__}) "
38
+ f"Django-ESI/{esi_version} (+{esi_url})"
39
+ ),
40
+ )
fleetfinder/constants.py DELETED
@@ -1,22 +0,0 @@
1
- """
2
- Constants used in this app
3
- """
4
-
5
- # Standard Library
6
- import os
7
-
8
- # Alliance Auth
9
- from esi import __version__ as esi_version
10
-
11
- # AA Fleet Finder
12
- from fleetfinder import __version__
13
-
14
- APP_NAME = "aa-fleetfinder"
15
- APP_NAME_VERBOSE = "AA Fleet Finder"
16
- APP_NAME_VERBOSE_USERAGENT = "AA-Fleet-Finder"
17
- PACKAGE_NAME = "fleetfinder"
18
- GITHUB_URL = f"https://github.com/ppfeufer/{APP_NAME}"
19
- USER_AGENT = f"{APP_NAME_VERBOSE_USERAGENT}/{__version__} (+{GITHUB_URL}) Django-ESI/{esi_version}"
20
-
21
- APP_BASE_DIR = os.path.join(os.path.dirname(__file__))
22
- APP_STATIC_DIR = os.path.join(APP_BASE_DIR, "static", PACKAGE_NAME)