def test_request_with_custom_header(self): # setUp connection = connect_s3() connection.create_bucket(settings.AWS_STORAGE_BUCKET_NAME) static_domain = get_static_site_domain() self.assertEqual( static_domain, 'staticgen-bucket.s3-website-us-east-1.amazonaws.com')
def test_domain_override(self): sitemaps = override_sitemaps_domain({'test': ExampleSitemap}) sitemap = sitemaps['test'] if callable(sitemap): sitemap = sitemap() url = sitemap.get_urls()[0] domain = 'http://{domain}'.format(domain=get_static_site_domain()) self.assertTrue(url['location'].startswith(domain))
def test_request_with_custom_header(self): # setUp connection = connect_s3() connection.create_bucket(settings.AWS_STORAGE_BUCKET_NAME) static_domain = get_static_site_domain() self.assertEqual(static_domain, 'staticgen-bucket.s3-website-us-east-1.amazonaws.com')