@@ -19,7 +19,7 @@ def _create_additional_promo(self):
1919 'promo_common' : 'special-10' ,
2020 }
2121 response_create = self .client .post (
22- self .promo_create_url ,
22+ self .promo_list_create_url ,
2323 self .__class__ .promo5_data ,
2424 format = 'json' ,
2525 )
@@ -99,7 +99,7 @@ def setUp(self):
9999 )
100100
101101 def test_get_all_promos (self ):
102- response = self .client .get (self .promo_list_url )
102+ response = self .client .get (self .promo_list_create_url )
103103 self .assertEqual (
104104 response .status_code ,
105105 rest_framework .status .HTTP_200_OK ,
@@ -113,7 +113,7 @@ def test_get_all_promos(self):
113113 self .assertEqual (response .headers .get ('X-Total-Count' ), '3' )
114114
115115 def test_get_promos_with_pagination_offset_1 (self ):
116- response = self .client .get (self .promo_list_url , {'offset' : 1 })
116+ response = self .client .get (self .promo_list_create_url , {'offset' : 1 })
117117 self .assertEqual (
118118 response .status_code ,
119119 rest_framework .status .HTTP_200_OK ,
@@ -127,7 +127,7 @@ def test_get_promos_with_pagination_offset_1(self):
127127
128128 def test_get_promos_with_pagination_offset_1_limit_1 (self ):
129129 response = self .client .get (
130- self .promo_list_url ,
130+ self .promo_list_create_url ,
131131 {'offset' : 1 , 'limit' : 1 },
132132 )
133133 self .assertEqual (
@@ -140,7 +140,7 @@ def test_get_promos_with_pagination_offset_1_limit_1(self):
140140 self .assertEqual (response .get ('X-Total-Count' ), '3' )
141141
142142 def test_get_promos_with_pagination_offset_100 (self ):
143- response = self .client .get (self .promo_list_url , {'offset' : 100 })
143+ response = self .client .get (self .promo_list_create_url , {'offset' : 100 })
144144 self .assertEqual (
145145 response .status_code ,
146146 rest_framework .status .HTTP_200_OK ,
@@ -150,7 +150,10 @@ def test_get_promos_with_pagination_offset_100(self):
150150 self .assertEqual (response .get ('X-Total-Count' ), '3' )
151151
152152 def test_get_promos_filter_country_gb (self ):
153- response = self .client .get (self .promo_list_url , {'country' : 'gb' })
153+ response = self .client .get (
154+ self .promo_list_create_url ,
155+ {'country' : 'gb' },
156+ )
154157 self .assertEqual (
155158 response .status_code ,
156159 rest_framework .status .HTTP_200_OK ,
@@ -164,7 +167,7 @@ def test_get_promos_filter_country_gb(self):
164167
165168 def test_get_promos_filter_country_gb_sort_active_until (self ):
166169 response = self .client .get (
167- self .promo_list_url ,
170+ self .promo_list_create_url ,
168171 {'country' : 'gb' , 'sort_by' : 'active_until' },
169172 )
170173 self .assertEqual (
@@ -180,7 +183,7 @@ def test_get_promos_filter_country_gb_sort_active_until(self):
180183
181184 def test_get_promos_filter_country_gb_fr_sort_active_from_limit_10 (self ):
182185 response = self .client .get (
183- self .promo_list_url ,
186+ self .promo_list_create_url ,
184187 {'country' : 'gb,FR' , 'sort_by' : 'active_from' , 'limit' : 10 },
185188 )
186189 self .assertEqual (
@@ -199,7 +202,7 @@ def test_get_promos_filter_country_gb_fr_sort_active_from_limit_2_offset_2(
199202 self ,
200203 ):
201204 response = self .client .get (
202- self .promo_list_url ,
205+ self .promo_list_create_url ,
203206 {
204207 'country' : 'gb,FR' ,
205208 'sort_by' : 'active_from' ,
@@ -218,7 +221,7 @@ def test_get_promos_filter_country_gb_fr_sort_active_from_limit_2_offset_2(
218221
219222 def test_get_promos_filter_country_gb_fr_us_sort_active_from_limit_2 (self ):
220223 response = self .client .get (
221- self .promo_list_url ,
224+ self .promo_list_create_url ,
222225 {'country' : 'gb,FR,us' , 'sort_by' : 'active_from' , 'limit' : 2 },
223226 )
224227 self .assertEqual (
@@ -233,7 +236,7 @@ def test_get_promos_filter_country_gb_fr_us_sort_active_from_limit_2(self):
233236 self .assertEqual (response .get ('X-Total-Count' ), '3' )
234237
235238 def test_get_promos_limit_zero (self ):
236- response = self .client .get (self .promo_list_url , {'limit' : 0 })
239+ response = self .client .get (self .promo_list_create_url , {'limit' : 0 })
237240 self .assertEqual (
238241 response .status_code ,
239242 rest_framework .status .HTTP_200_OK ,
@@ -245,7 +248,7 @@ def test_create_and_get_promos(self):
245248 self ._create_additional_promo ()
246249
247250 response_list = self .client .get (
248- self .promo_list_url ,
251+ self .promo_list_create_url ,
249252 {'country' : 'gb,FR,Kz' , 'sort_by' : 'active_from' , 'limit' : 10 },
250253 )
251254 self .assertEqual (
@@ -260,7 +263,7 @@ def test_create_and_get_promos(self):
260263 def test_get_promos_filter_gb_kz_fr (self ):
261264 self ._create_additional_promo ()
262265 response = self .client .get (
263- self .promo_list_url ,
266+ self .promo_list_create_url ,
264267 {'country' : 'gb,Kz,FR' , 'sort_by' : 'active_from' , 'limit' : 10 },
265268 )
266269 self .assertEqual (
@@ -275,7 +278,7 @@ def test_get_promos_filter_gb_kz_fr(self):
275278 def test_get_promos_filter_kz_sort_active_until (self ):
276279 self ._create_additional_promo ()
277280 response = self .client .get (
278- self .promo_list_url ,
281+ self .promo_list_create_url ,
279282 {'country' : 'Kz' , 'sort_by' : 'active_until' , 'limit' : 10 },
280283 )
281284 self .assertEqual (
@@ -300,7 +303,7 @@ def test_country_parameter_formats(self, _, params, expected_count):
300303 'limit' : 10 ,
301304 }
302305
303- response = self .client .get (self .promo_list_url , full_params )
306+ response = self .client .get (self .promo_list_create_url , full_params )
304307 self .assertEqual (
305308 response .status_code ,
306309 rest_framework .status .HTTP_200_OK ,
0 commit comments