@@ -0,0 +1,2010 @@
+'''%0AThis basic test module uses live websites for checks.%0AFor better independence mockup websites should be used.%0AThis would be overkill for this exercise. (In my opinion)%0A%0A'''%0Aimport imagine%0Aimport pytest%0Aimport requests%0Aimport os%0Aimport requests.exceptions%0A%0Adef test_http_to_https_conversion():%0A    assert imagine.get_https_url('http://www.google.de') == 'https://www.google.de'%0A    assert imagine.get_https_url('http://www.imgur.com/example_image.jpg') == 'https://www.imgur.com/example_image.jpg'%0A    assert imagine.get_https_url(%0A        'http://amazon.de/very/long/path/to/success.jpg') == 'https://amazon.de/very/long/path/to/success.jpg'%0A    # This is not what we want, but still what we currently get%0A    assert imagine.get_https_url('www.google.de') == 'https:///www.google.de'%0A%0Adef test_https_availablity():%0A    with requests.Session() as s:%0A        assert imagine.check_https_available(s, 'http://example.com')%0A        assert imagine.check_https_available(s, 'https://example.com')%0A        with pytest.raises(requests.exceptions.SSLError) as ssle:%0A            imagine.check_https_available(s, 'http://test.dclabs.de')%0A        assert imagine.check_https_available(s, 'http://test.dclabs.de', verify=False)%0A        assert not imagine.check_https_available(s, 'http://stuttgarter-zeitung.de')%0A        with pytest.raises(requests.ConnectionError) as e:%0A            imagine.check_https_available(s, 'http://get2gather.com')%0A%0Adef test_image_type_check():%0A    with requests.Session() as s:%0A        assert imagine.check_image_type(s, 'http://i.imgur.com/7Xkl7ec.gif')%0A        assert not imagine.check_image_type(s, 'http://i.imgur.com/')%0A        assert not imagine.check_image_type(s, 'http://google.com/')%0A%0Adef test_image_download(tmpdir):%0A    with requests.Session() as s:%0A        dest = tmpdir.mkdir('test')%0A        imagine.download_file(s, 'http://i.imgur.com/7Xkl7ec.gif', destination=str(dest))%0A        assert len(dest.listdir()) == 1%0A        assert os.path.getsize(str(dest.listdir()%5B0%5D)) == 2052216

Add test cases