Check that project creation via the API doesn't required a captcha. (#926)

Fixes #922
This commit is contained in:
Alexis Metaireau 2021-11-21 17:39:42 +01:00 committed by GitHub
parent beac10be0b
commit 2adc2bf0be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -285,6 +285,19 @@ class CaptchaTestCase(IhatemoneyTestCase):
)
assert len(models.Project.query.all()) == 1
def test_api_project_creation_does_not_need_captcha(self):
resp = self.client.post(
"/api/projects",
data={
"name": "raclette",
"id": "raclette",
"password": "raclette",
"contact_email": "raclette@notmyidea.org",
},
)
self.assertTrue(resp.status, 201)
assert len(models.Project.query.all()) == 1
class TestCurrencyConverter(unittest.TestCase):
converter = CurrencyConverter()