python-terminusgps 31.3.0__py3-none-any.whl → 31.4.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 python-terminusgps might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 31.3.0
3
+ Version: 31.4.0
4
4
  Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
5
5
  Project-URL: Documentation, https://app.terminusgps.com/docs/apps/python-terminusgps/index.html
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -12,6 +12,7 @@ terminusgps/authorizenet/profiles/subscriptions.py,sha256=N4_0kbBBJ0FtKdIydN8FLn
12
12
  terminusgps/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  terminusgps/aws/connect.py,sha256=TWf2bVz6LqSNQfVD7FKRn3K71VuLOwBj05Gs-9BsROg,693
14
14
  terminusgps/aws/secrets.py,sha256=MxQEmmBLpMUQ2tYAsHdCYf-7RZ84LiogdKcTsACX5dw,361
15
+ terminusgps/aws/utils.py,sha256=68GWcllu4h41qzFiKdUkWOAA4LDsTPqRY446VRMxYsY,116
15
16
  terminusgps/django/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
17
  terminusgps/django/mixins.py,sha256=Q9ZJuzpk3d9lDnlVA8ZTVvnZWxB13p08EQ8yVJcztn4,1034
17
18
  terminusgps/django/settings.py,sha256=cKUpFXH-uYWStvT6vzclczJAKwCGNx_2wY9-fqsbmIs,624
@@ -34,7 +35,8 @@ terminusgps/wialon/items/route.py,sha256=amNPKZqgl8pEzKA_XJudnvBPzEsfHTmrC7uF15s
34
35
  terminusgps/wialon/items/unit.py,sha256=jq4S8EV_yukRTTE8rr2oXpu_9AdXDFYA6-GCjkR6shw,12282
35
36
  terminusgps/wialon/items/unit_group.py,sha256=QV2ZZgICaN3n6W1pFIyMLyNKB6KYBsLyKG64i-qXoOg,4113
36
37
  terminusgps/wialon/items/user.py,sha256=5LgwalGO8KS_7psmAVmAlnC0S6SPBDZMOuT5ZqPKRmo,7758
37
- python_terminusgps-31.3.0.dist-info/METADATA,sha256=n-d09k232ROHl_dbQ-Ky0SyWY-_ajnFxhPVSo9Ta2LY,1648
38
- python_terminusgps-31.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
- python_terminusgps-31.3.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
40
- python_terminusgps-31.3.0.dist-info/RECORD,,
38
+ terminusgps/wialon/tests/test_session.py,sha256=Dnm4ZZr31jTg2WHyRrYwiU7_1dQHokThyuO_OYiXpEg,642
39
+ python_terminusgps-31.4.0.dist-info/METADATA,sha256=XF4L6nr7eF8K2zbaD8l8LP1Ue37jhvVw0_zhS2VDINM,1648
40
+ python_terminusgps-31.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
+ python_terminusgps-31.4.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
42
+ python_terminusgps-31.4.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ import requests
2
+
3
+
4
+ def get_public_ip() -> str:
5
+ return requests.get("https://checkip.amazonaws.com").text.strip()
@@ -0,0 +1,22 @@
1
+ import socket
2
+ import unittest
3
+
4
+ from django.conf import settings
5
+
6
+ from ..session import WialonSession
7
+
8
+
9
+ class WialonSessionTestCase(unittest.TestCase):
10
+ def setUp(self) -> None:
11
+ self.session = WialonSession()
12
+
13
+ def test_session_init(self) -> None:
14
+ self.assertEqual(self.session.token, settings.WIALON_TOKEN)
15
+ self.assertIsNone(self.session.id)
16
+ self.assertIsNone(self.session.username)
17
+ self.assertIsNone(self.session.uid)
18
+
19
+ def test_session_login(self) -> None:
20
+ mock_login_response = {"host": socket.gethostbyname(socket.gethostname())}
21
+
22
+ self.session.login(settings.WIALON_TOKEN)