@@ -344,15 +344,15 @@ def _try_post():
344
344
345
345
_try_post ()
346
346
347
- api_user = get (User , staff = False , password = 'test' )
347
+ api_user = get (User , is_staff = False , password = 'test' )
348
348
assert api_user .is_staff is False
349
349
client .force_authenticate (user = api_user )
350
350
_try_post ()
351
351
352
352
def test_update_build_without_permission (self ):
353
353
"""Ensure anonymous/non-staff users cannot update build endpoints."""
354
354
client = APIClient ()
355
- api_user = get (User , staff = False , password = 'test' )
355
+ api_user = get (User , is_staff = False , password = 'test' )
356
356
client .force_authenticate (user = api_user )
357
357
build = get (Build , project_id = 1 , version_id = 1 , state = 'cloning' )
358
358
resp = client .put (
@@ -376,7 +376,7 @@ def test_make_build_protected_fields(self):
376
376
build = get (Build , project_id = 1 , version_id = 1 , builder = 'foo' )
377
377
client = APIClient ()
378
378
379
- api_user = get (User , staff = False , password = 'test' )
379
+ api_user = get (User , is_staff = False , password = 'test' )
380
380
client .force_authenticate (user = api_user )
381
381
resp = client .get ('/api/v2/build/{}/' .format (build .pk ), format = 'json' )
382
382
self .assertEqual (resp .status_code , 200 )
@@ -565,7 +565,7 @@ def test_build_filter_by_commit(self):
565
565
get (Build , project_id = 1 , version_id = 1 , builder = 'foo' , commit = 'test' )
566
566
get (Build , project_id = 2 , version_id = 1 , builder = 'foo' , commit = 'other' )
567
567
client = APIClient ()
568
- api_user = get (User , staff = False , password = 'test' )
568
+ api_user = get (User , is_staff = False , password = 'test' )
569
569
client .force_authenticate (user = api_user )
570
570
resp = client .get ('/api/v2/build/' , {'commit' : 'test' }, format = 'json' )
571
571
self .assertEqual (resp .status_code , 200 )
0 commit comments