aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_create_app.py')
-rw-r--r--tests/test_create_app.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/test_create_app.py b/tests/test_create_app.py
index 8a7ea62..c7282df 100644
--- a/tests/test_create_app.py
+++ b/tests/test_create_app.py
@@ -70,5 +70,24 @@ def test_app_account_create():
70 # We can also test resending (marginally) 70 # We can also test resending (marginally)
71 test_app_api.email_resend_confirmation() 71 test_app_api.email_resend_confirmation()
72 72
73 73@pytest.mark.vcr(match_on=['path'])
74 74def test_app_account_create_invalid():
75 suffix = str(time.time()).replace(".", "")[-5:]
76
77 test_app = test_app = Mastodon.create_app(
78 "mastodon.py generated test app",
79 api_base_url="http://localhost:3000/"
80 )
81
82 test_app_api = Mastodon(
83 test_app[0],
84 test_app[1],
85 api_base_url="http://localhost:3000/"
86 )
87 test_token, error = test_app_api.create_account("coolguy" + suffix, "", "email@localhost" + suffix, agreement=False, return_detailed_error=True)
88 assert test_token is None
89 assert "details" in error
90 assert "password" in error.details
91 assert "password" in error.details
92 assert not "username" in error.details
93 \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)