From f8f18c40e70fdfb77dc00f3f7553f6e51dcac1d0 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 23 Feb 2022 21:24:20 +0300 Subject: [PATCH] add test_api_publications_add_empty --- tests/test_pub1c-rest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_pub1c-rest.py b/tests/test_pub1c-rest.py index c6f10eb..8798c19 100644 --- a/tests/test_pub1c-rest.py +++ b/tests/test_pub1c-rest.py @@ -148,6 +148,13 @@ def test_api_publications_add(client): assert response.status_code == 409 +def test_api_publications_add_empty(client): + endpoint = '/api/v1/publications' + # add with empty name + response = client.put(path=endpoint, data={'name': ''}) + assert response.status_code == 422 + + def test_api_publications_add_force(client): endpoint = '/api/v1/publications' # add