client = <django.test.client.Client object at 0x7f86271df2e8>
regular_user = <User: johndoe>
@pytest.mark.django_db(transaction=True, reset_sequences=True)
def test_add_forge_request_create_success_form_encoded(client, regular_user):
client.force_login(regular_user)
url = reverse("api-1-add-forge-request-create")
date_before = datetime.datetime.now(tz=datetime.timezone.utc)
resp = check_http_post_response(
client,
url,
request_content_type="application/x-www-form-urlencoded",
data=urlencode(ADD_FORGE_DATA_FORGE1),
status_code=201,
)
date_after = datetime.datetime.now(tz=datetime.timezone.utc)
> assert resp.data == {
**ADD_FORGE_DATA_FORGE1,
"id": 1,
"status": "PENDING",
"submission_date": resp.data["submission_date"],
"submitter_name": regular_user.username,
"submitter_email": regular_user.email,
}
E AssertionError: assert {'id': 1, 'mo...orge members'} == {'forge_conta...'gitlab', ...}
E Omitting 11 identical items, use -vv to show
E Left contains 2 more items:
E {'last_modified_date': '2022-05-02T11:09:18.282717Z', 'moderator': 'None'}
E Full diff:
E {
E 'forge_contact_comment': 'user marked as owner in forge members',
E 'forge_contact_email': 'admin@gitlab.example.org',...
E
E ...Full output truncated (13 lines hidden), use '-vv' to show
.tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_add_forge_now.py:144: AssertionError
TEST RESULT
TEST RESULT
- Run At
- May 2 2022, 1:32 PM