Skip to content

Commit b452cf1

Browse files
committed
[FIX] tests
1 parent 7762971 commit b452cf1

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

spp_demo_common/tests/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ All Python functions and methods in the following models are covered:
118118

119119
All tests follow OpenSPP testing best practices:
120120

121-
- Use `@tagged("post_install", "-at_install")` decorator
122121
- Extend `TransactionCase` for database transactions
123122
- Set up test data in `setUpClass` method
124123
- Use descriptive test names with `test_XX_` prefix

spp_demo_common/tests/test_demo_data_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def setUpClass(cls):
2525
# Create test country with faker locale
2626
cls.test_country = cls.env["res.country"].create(
2727
{
28-
"name": "Test Country",
29-
"code": "TC",
28+
"name": "Test Country Generator",
29+
"code": "T1",
3030
"faker_locale": "en_US",
3131
"faker_locale_available": True,
3232
"lat_min": -10.0,

spp_demo_common/tests/test_res_country.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def test_01_custom_fields_exist(self):
2121
"""Test that custom country fields exist"""
2222
country = self.env["res.country"].create(
2323
{
24-
"name": "Test Country",
25-
"code": "TC",
24+
"name": "Test Country Fields",
25+
"code": "T2",
2626
}
2727
)
2828

@@ -39,7 +39,7 @@ def test_02_create_country_with_gps_bounds(self):
3939
country = self.env["res.country"].create(
4040
{
4141
"name": "GPS Bounds Country",
42-
"code": "GB",
42+
"code": "T3",
4343
"lat_min": -10.5,
4444
"lat_max": 10.5,
4545
"lon_min": -20.5,
@@ -57,7 +57,7 @@ def test_03_create_country_with_faker_locale(self):
5757
country = self.env["res.country"].create(
5858
{
5959
"name": "Faker Locale Country",
60-
"code": "FL",
60+
"code": "T4",
6161
"faker_locale": "en_US",
6262
"faker_locale_available": True,
6363
}
@@ -71,7 +71,7 @@ def test_04_update_country_gps_bounds(self):
7171
country = self.env["res.country"].create(
7272
{
7373
"name": "Update GPS Country",
74-
"code": "UG",
74+
"code": "T5",
7575
}
7676
)
7777

@@ -94,7 +94,7 @@ def test_05_update_faker_locale(self):
9494
country = self.env["res.country"].create(
9595
{
9696
"name": "Update Faker Country",
97-
"code": "UF",
97+
"code": "T6",
9898
"faker_locale": "en_US",
9999
}
100100
)
@@ -114,7 +114,7 @@ def test_06_gps_bounds_negative_values(self):
114114
country = self.env["res.country"].create(
115115
{
116116
"name": "Negative GPS Country",
117-
"code": "NG",
117+
"code": "T7",
118118
"lat_min": -50.0,
119119
"lat_max": -30.0,
120120
"lon_min": -100.0,
@@ -132,7 +132,7 @@ def test_07_gps_bounds_zero_values(self):
132132
country = self.env["res.country"].create(
133133
{
134134
"name": "Zero GPS Country",
135-
"code": "ZG",
135+
"code": "T8",
136136
"lat_min": 0.0,
137137
"lat_max": 0.0,
138138
"lon_min": 0.0,
@@ -150,7 +150,7 @@ def test_08_multiple_countries_different_locales(self):
150150
us_country = self.env["res.country"].create(
151151
{
152152
"name": "Test United States",
153-
"code": "TU",
153+
"code": "T9",
154154
"faker_locale": "en_US",
155155
"faker_locale_available": True,
156156
}
@@ -159,7 +159,7 @@ def test_08_multiple_countries_different_locales(self):
159159
fr_country = self.env["res.country"].create(
160160
{
161161
"name": "Test France",
162-
"code": "TF",
162+
"code": "TA",
163163
"faker_locale": "fr_FR",
164164
"faker_locale_available": True,
165165
}
@@ -168,7 +168,7 @@ def test_08_multiple_countries_different_locales(self):
168168
de_country = self.env["res.country"].create(
169169
{
170170
"name": "Test Germany",
171-
"code": "TG",
171+
"code": "TB",
172172
"faker_locale": "de_DE",
173173
"faker_locale_available": True,
174174
}
@@ -183,7 +183,7 @@ def test_09_country_without_optional_fields(self):
183183
country = self.env["res.country"].create(
184184
{
185185
"name": "Minimal Country",
186-
"code": "MC",
186+
"code": "TD",
187187
}
188188
)
189189

@@ -200,7 +200,7 @@ def test_10_inherit_model_check(self):
200200
country = self.env["res.country"].create(
201201
{
202202
"name": "Inherit Test Country",
203-
"code": "IT",
203+
"code": "TE",
204204
}
205205
)
206206

@@ -245,7 +245,7 @@ def test_12_float_precision_gps_bounds(self):
245245
country = self.env["res.country"].create(
246246
{
247247
"name": "Precision GPS Country",
248-
"code": "PG",
248+
"code": "TH",
249249
"lat_min": 12.345678,
250250
"lat_max": 12.876543,
251251
"lon_min": -98.765432,

spp_demo_common/tests/test_res_partner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def setUpClass(cls):
2020
# Create a demo data generator for testing
2121
cls.test_country = cls.env["res.country"].create(
2222
{
23-
"name": "Test Country",
24-
"code": "TC",
23+
"name": "Test Country Partner",
24+
"code": "TP",
2525
"faker_locale": "en_US",
2626
}
2727
)

0 commit comments

Comments
 (0)