def test_008_s3(self):
"""Cache on amazon is working properly"""
if not environ.get('TRAVIS') == 'true':
# This set of tests can be run just locally with properly set
# amazon credentials, this will synchronize the xsd files
# (and others) it does not make sense in travis.
url = self.test_url_plain
url_on_s3 = self.s3_url_plain
new_url = tools.cache_s3(url, self.test_plain)
self.assertEqual(new_url, url_on_s3,
'The url on amazon was not setted properly '
'got %s' % new_url)
new_url = tools.cache_s3(url_on_s3, self.test_plain)
self.assertEqual(new_url, url_on_s3,
'The url on amazon wired not return what I expected'
' properly got %s' % new_url)
check_s3 = tools.check_s3('NOTEXISTSORNOTPROPERACL', 'url/no/exists')
self.assertFalse(check_s3, 'checking a non existing bucket fails')
check_s3 = tools.check_s3('s3.vauxoo.com', 'url/no/exists')
self.assertFalse(check_s3, 'checking a non existing element fails')
评论列表
文章目录