From eb66900ba3f21368186cc1412084f4341fbf02aa Mon Sep 17 00:00:00 2001 From: Son NK Date: Wed, 11 Mar 2020 13:35:56 +0100 Subject: [PATCH] make test more stable --- tests/api/test_new_custom_alias.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/api/test_new_custom_alias.py b/tests/api/test_new_custom_alias.py index 1881d79c..9f2f6a93 100644 --- a/tests/api/test_new_custom_alias.py +++ b/tests/api/test_new_custom_alias.py @@ -34,6 +34,17 @@ def test_success(flask_client): new_ge = GenEmail.get_by(email=r.json["alias"]) assert new_ge.note == "test note" + +def test_create_custom_alias_without_note(flask_client): + user = User.create( + email="a@b.c", password="password", name="Test User", activated=True + ) + db.session.commit() + + # create api_key + api_key = ApiKey.create(user.id, "for test") + db.session.commit() + # create alias without note word = random_word() r = flask_client.post(