From 023f0c5a465f6c27a52477326e6c60eb40025be9 Mon Sep 17 00:00:00 2001 From: maike Date: Thu, 9 Jul 2020 03:07:12 +0200 Subject: [PATCH] [tests] Happy path tests for email API --- tests/test_api_email_happy_path.py | 10 ++++++++++ tests/{test_api_email.py => test_api_email_wrong.py} | 0 2 files changed, 10 insertions(+) create mode 100644 tests/test_api_email_happy_path.py rename tests/{test_api_email.py => test_api_email_wrong.py} (100%) diff --git a/tests/test_api_email_happy_path.py b/tests/test_api_email_happy_path.py new file mode 100644 index 0000000..a827dee --- /dev/null +++ b/tests/test_api_email_happy_path.py @@ -0,0 +1,10 @@ +# Copyright (C) 2020 by Maike +# +# SPDX-License-Identifier: 0BSD + +from fastapi import status + + +def test_email_create_unauthorized(client, hood_id): + response = client.post('/api/hoods/%d/email/' % hood_id) + assert response.status_code == status.HTTP_401_UNAUTHORIZED diff --git a/tests/test_api_email.py b/tests/test_api_email_wrong.py similarity index 100% rename from tests/test_api_email.py rename to tests/test_api_email_wrong.py