File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 21
21
from qualicharge .schemas .static import Amenageur , Localisation
22
22
23
23
24
+ @pytest .mark .parametrize (
25
+ "phone_number" ,
26
+ (
27
+ "+33144276350" ,
28
+ "+33.1 44 27 63 50" ,
29
+ "+33 (0)1 44 27 63 50" ,
30
+ "+33 1 44 27 63 50" ,
31
+ "0144276350" ,
32
+ "01 44 27 63 50" ,
33
+ "01-44-27-63-50" ,
34
+ "(01)44276350" ,
35
+ ),
36
+ )
37
+ def test_operateur_phone_numbers (phone_number ):
38
+ """Test Operator schema accepted phone number formats."""
39
+ operateur = OperateurFactory .build (telephone_operateur = phone_number )
40
+ assert operateur .telephone_operateur == "tel:+33-1-44-27-63-50"
41
+
42
+
24
43
def test_localisation_schema_set_geometry_point_validator (db_session ):
25
44
"""Test the Localisation schema `set_geometry_point` validator."""
26
45
# Create and save a new location
You can’t perform that action at this time.
0 commit comments