You've already forked hotpocket
BTHLABS-58: Share Extension in Apple Apps
This commit is contained in:
@@ -110,12 +110,12 @@ def test_ok_netloc_banned(authenticated_client: Client,
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_ok_resuse_save(save_out,
|
||||
authenticated_client: Client,
|
||||
call,
|
||||
account,
|
||||
mock_saves_process_save_task_apply_async: mock.Mock,
|
||||
):
|
||||
def test_ok_reuse_save(save_out,
|
||||
authenticated_client: Client,
|
||||
call,
|
||||
account,
|
||||
mock_saves_process_save_task_apply_async: mock.Mock,
|
||||
):
|
||||
# Given
|
||||
call['params'][0] = save_out.url
|
||||
|
||||
@@ -148,13 +148,13 @@ def test_ok_resuse_save(save_out,
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_ok_resuse_association(association_out,
|
||||
save_out,
|
||||
authenticated_client: Client,
|
||||
call,
|
||||
account,
|
||||
mock_saves_process_save_task_apply_async: mock.Mock,
|
||||
):
|
||||
def test_ok_reuse_association(association_out,
|
||||
save_out,
|
||||
authenticated_client: Client,
|
||||
call,
|
||||
account,
|
||||
mock_saves_process_save_task_apply_async: mock.Mock,
|
||||
):
|
||||
# Given
|
||||
call['params'][0] = save_out.url
|
||||
|
||||
@@ -263,6 +263,31 @@ def test_empty_url(authenticated_client: Client,
|
||||
assert call_result['error']['data']['url'] == ['blank']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_invalid_url(authenticated_client: Client,
|
||||
call,
|
||||
account,
|
||||
mock_saves_process_save_task_apply_async: mock.Mock,
|
||||
):
|
||||
# Given
|
||||
call['params'][0] = 'thisisntright'
|
||||
|
||||
# When
|
||||
result = authenticated_client.post(
|
||||
reverse('ui.rpc'),
|
||||
data=call,
|
||||
content_type='application/json',
|
||||
)
|
||||
|
||||
# Then
|
||||
assert result.status_code == http.HTTPStatus.OK
|
||||
|
||||
call_result = result.json()
|
||||
assert 'error' in call_result
|
||||
|
||||
assert call_result['error']['data']['url'] == ['invalid']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_inactive_account(inactive_account_client: Client, call):
|
||||
# When
|
||||
|
||||
Reference in New Issue
Block a user