tests: fix roles deployment test (#81920)
gitea/hobo/pipeline/head This commit looks good Details

This commit is contained in:
Serghei Mihai 2023-10-03 16:21:32 +02:00
parent b1fca9c6e9
commit 56bba71638
1 changed files with 2 additions and 2 deletions

View File

@ -1463,7 +1463,7 @@ def test_deploy_application_roles(app, admin_user, settings, app_bundle_roles):
resp = app.get('/applications/')
resp = resp.click('Install')
resp.form['bundle'] = Upload('app.tar', app_bundle_roles, 'application/x-tar')
with HTTMock(httmock.remember_called(mocked_http)):
with StatefulHTTMock(httmock.remember_called(mocked_http)):
resp.form.submit().follow()
# ou must be specified when calling authentic API
assert mocked_http.call['requests'][0].url.startswith(
@ -1479,7 +1479,7 @@ def test_deploy_application_roles(app, admin_user, settings, app_bundle_roles):
v.service_type = ContentType.objects.get_for_model(Wcs)
v.service_pk = wcs.id
v.save()
with HTTMock(httmock.remember_called(mocked_http)):
with StatefulHTTMock(httmock.remember_called(mocked_http)):
resp.form.submit().follow()
assert b'"ou": "default"' in mocked_http.call['requests'][0].body