python-terminusgps 33.3.1__py3-none-any.whl → 33.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 33.3.1
3
+ Version: 33.5.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://docs.terminusgps.com
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -32,10 +32,6 @@ terminusgps/django/tests/test_mixins.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
32
32
  terminusgps/django/tests/test_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  terminusgps/twilio/__init__.py,sha256=dYo41F2jft_eHDWSUtSpKGSRG1bewq_qClqilUJZkYM,33
34
34
  terminusgps/twilio/caller.py,sha256=l53-IxXn0wXc_oDcDxfhlrKPz-F4_KfMPV1dAzZjNo4,5060
35
- terminusgps/twilio/validators.py,sha256=HWCpzgDXTedofty4Zhrm2OenbgtkzrDUC08B1l15gqc,1112
36
- terminusgps/twilio/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- terminusgps/twilio/tests/test_caller.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- terminusgps/twilio/tests/test_validators.py,sha256=CETv7Mcr19UMMfh1UaWSV26FiOeh2WCK_VutfKXnf7g,1428
39
35
  terminusgps/wialon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
36
  terminusgps/wialon/constants.py,sha256=Ju2XL2A4DPFD-w8NjYqEfnnqregl1luPT0XGhGSUnO8,6316
41
37
  terminusgps/wialon/flags.py,sha256=M50EdhxQ8IMnJnU0mrHK7-h8Asc6tvNiTOOfd1dBW6A,12815
@@ -54,7 +50,7 @@ terminusgps/wialon/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
54
50
  terminusgps/wialon/tests/test_items.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
51
  terminusgps/wialon/tests/test_session.py,sha256=9mBlYchMo9NeqRIZsmxYzrM1zBHorqu4ooxqSNppLpI,1336
56
52
  terminusgps/wialon/tests/test_utils.py,sha256=SK4PxJQGECFnzx_EQeRAQfsQ5_3FLaVcis2W9u_ibuI,1730
57
- python_terminusgps-33.3.1.dist-info/METADATA,sha256=BoV05Kh_54bDSH1P82Pe7MhHm3j8OTqBMqwZiEMrC0w,1616
58
- python_terminusgps-33.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
59
- python_terminusgps-33.3.1.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
60
- python_terminusgps-33.3.1.dist-info/RECORD,,
53
+ python_terminusgps-33.5.0.dist-info/METADATA,sha256=Jd4lLTQC74E24wIMEG6WDYXiYg0e4uY8i-LTxwWkEvs,1616
54
+ python_terminusgps-33.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
55
+ python_terminusgps-33.5.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
56
+ python_terminusgps-33.5.0.dist-info/RECORD,,
File without changes
File without changes
@@ -1,40 +0,0 @@
1
- from unittest import TestCase
2
-
3
- import django
4
- from django.core.exceptions import ValidationError
5
-
6
- from terminusgps.twilio import validators
7
-
8
- django.setup()
9
-
10
-
11
- class PhoneNumberValidatorTestCase(TestCase):
12
- def setUp(self) -> None:
13
- self.validator = validators.validate_phone_number
14
-
15
- def test_phone_without_plus(self) -> None:
16
- """Fails if a phone number without a '+' leading character passes validation."""
17
- with self.assertRaises(ValidationError) as context:
18
- self.validator("15555555555")
19
- self.assertTrue(
20
- "Phone number must begin with a '+', got '15555555555'."
21
- in str(context.exception)
22
- )
23
-
24
- def test_phone_min_length(self) -> None:
25
- """Fails if a phone number of 8 characters in length passes validation."""
26
- with self.assertRaises(ValidationError) as context:
27
- self.validator("+1555555")
28
- self.assertTrue(
29
- "Phone number cannot be less than 12 characters, got 8."
30
- in str(context.exception)
31
- )
32
-
33
- def test_phone_max_length(self) -> None:
34
- """Fails if a phone number of 20 characters in length passes validation."""
35
- with self.assertRaises(ValidationError) as context:
36
- self.validator("+1555555555555555555")
37
- self.assertTrue(
38
- "Phone number cannot be greater than 19 characters, got 20."
39
- in str(context.exception)
40
- )
@@ -1,31 +0,0 @@
1
- from django.core.exceptions import ValidationError
2
- from django.utils.translation import gettext_lazy as _
3
-
4
-
5
- def validate_phone_number(value: str) -> None:
6
- min_length, max_length = 12, 19
7
-
8
- if not value.startswith("+"):
9
- raise ValidationError(
10
- _("Phone number must begin with a '+', got '%(value)s'."),
11
- code="invalid",
12
- params={"value": value},
13
- )
14
- if not value[1:].isdigit():
15
- raise ValidationError(
16
- _("Phone number must be '+' followed by a digit, got '%(value)s'"),
17
- code="invalid",
18
- params={"value": value},
19
- )
20
- if len(value) < min_length:
21
- raise ValidationError(
22
- _("Phone number cannot be less than %(min)s characters, got %(len)s."),
23
- code="invalid",
24
- params={"min": min_length, "len": len(value)},
25
- )
26
- if len(value) > max_length:
27
- raise ValidationError(
28
- _("Phone number cannot be greater than %(max)s characters, got %(len)s."),
29
- code="invalid",
30
- params={"max": max_length, "len": len(value)},
31
- )