diff options
author | Lorenz Diener <[email protected]> | 2018-05-06 15:55:32 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2018-05-06 15:55:32 +0200 |
commit | ca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d (patch) | |
tree | 98328e8776447334b19592992016d9b7f16ae98b /tests/test_constructor.py | |
parent | 06e32c14bcb5a1ef1a5e618a1b413ea011416c9d (diff) | |
parent | fbd4122fec092bff6b1cc9f44dfeda6ee693c41b (diff) | |
download | mastodon.py-ca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d.tar.gz |
Merge branch 'master' into stream-timeout
Diffstat (limited to 'tests/test_constructor.py')
-rw-r--r-- | tests/test_constructor.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_constructor.py b/tests/test_constructor.py index cdeb962..950845a 100644 --- a/tests/test_constructor.py +++ b/tests/test_constructor.py | |||
@@ -20,6 +20,22 @@ def test_constructor_illegal_ratelimit(): | |||
20 | 'foo', client_secret='bar', | 20 | 'foo', client_secret='bar', |
21 | ratelimit_method='baz') | 21 | ratelimit_method='baz') |
22 | 22 | ||
23 | def test_constructor_illegal_versioncheckmode(): | ||
24 | with pytest.raises(MastodonIllegalArgumentError): | ||
25 | api = Mastodon( | ||
26 | 'foo', client_secret='bar', | ||
27 | version_check_mode='baz') | ||
28 | |||
29 | |||
23 | def test_constructor_missing_client_secret(): | 30 | def test_constructor_missing_client_secret(): |
24 | with pytest.raises(MastodonIllegalArgumentError): | 31 | with pytest.raises(MastodonIllegalArgumentError): |
25 | api = Mastodon('foo') | 32 | api = Mastodon('foo') |
33 | |||
34 | @pytest.mark.vcr() | ||
35 | def test_verify_version(api): | ||
36 | assert api.verify_minimum_version("2.3.3") == True | ||
37 | assert api.verify_minimum_version("2.3.4") == False | ||
38 | assert api.verify_minimum_version("2.4.3") == False | ||
39 | assert api.verify_minimum_version("3.3.3") == False | ||
40 | assert api.verify_minimum_version("1.0.0") == True | ||
41 | \ No newline at end of file | ||