From 4b00c448f4a55859d5177c981a8fc4b388e8b5b3 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 6 May 2018 02:50:54 +0200 Subject: Add another bunch of tests --- tests/test_constructor.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/test_constructor.py') 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(): 'foo', client_secret='bar', ratelimit_method='baz') +def test_constructor_illegal_versioncheckmode(): + with pytest.raises(MastodonIllegalArgumentError): + api = Mastodon( + 'foo', client_secret='bar', + version_check_mode='baz') + + def test_constructor_missing_client_secret(): with pytest.raises(MastodonIllegalArgumentError): api = Mastodon('foo') + +@pytest.mark.vcr() +def test_verify_version(api): + assert api.verify_minimum_version("2.3.3") == True + assert api.verify_minimum_version("2.3.4") == False + assert api.verify_minimum_version("2.4.3") == False + assert api.verify_minimum_version("3.3.3") == False + assert api.verify_minimum_version("1.0.0") == True + \ No newline at end of file -- cgit v1.2.3