"""Test s3 file upload.""" from boto import exception from boto.s3 import connection from moto import mock_s3 import pytest from assets.connectors import s3 @mock_s3 def test_connect_to_s3_success(): """Test s3 connection.""" conn = s3.connect_to_s3() assert isinstance(conn, connection.S3Connection) def test_connect_to_s3_failed(): """Test s3 get url of file in unavailable bucket.""" with pytest.raises(exception.NoAuthHandlerFound): s3.connect_to_s3()