diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..2c07333 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11 diff --git a/spkrepo/tests/test_frontend.py b/spkrepo/tests/test_frontend.py index 632161c..935811f 100644 --- a/spkrepo/tests/test_frontend.py +++ b/spkrepo/tests/test_frontend.py @@ -196,13 +196,23 @@ def test_post_generate_api_key_not_developer(self): class RegisterTestCase(BaseTestCase): - def test_unique_user_username(self): + def test_invalid_email(self): data = dict( username="test", email="test@test.com", password="password", password_confirm="password", ) + response = self.client.post(url_for_security("register"), data=data) + self.assertIn("Invalid email address", response.data.decode()) + + def test_unique_user_username(self): + data = dict( + username="test", + email="test@gmail.com", + password="password", + password_confirm="password", + ) self.client.post(url_for_security("register"), data=data) response = self.client.post(url_for_security("register"), data=data) self.assertIn("Username already taken", response.data.decode())