Skip to content

Commit

Permalink
Add missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Jun 1, 2024
1 parent 3a53dc1 commit 8b9a6cf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mesads/test_s3storage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import unittest

from .s3storage import HackishS3Boto3Storage


class TestHackishS3Boto3Storage(unittest.TestCase):
def test_storage(self):
storage = HackishS3Boto3Storage(
bucket_name="mybucket.domain.com",
access_key="key",
secret_key="secret",
endpoint_url="https://cellar-c2.services.clever-cloud.com/",
)
res = storage.url("/directory/file.jpg")
self.assertIn("https://mybucket.domain.com/directory/file.jpg", res)
self.assertIn("AWSAccessKeyId=", res)
self.assertIn("Signature=", res)
self.assertIn("Expires=", res)

0 comments on commit 8b9a6cf

Please sign in to comment.