Exemplo n.º 1
0
 def test_raises_MissingCredentials_on_missed_secret(self):
     try:
         get_s3(
             's3://example.com/file1.csv',
             lambda url: {'access': 'access'})
     except MissingCredentials as exc:
         self.assertIn('secret', str(exc))
Exemplo n.º 2
0
 def test_raises_TypeError_if_not_callable_account_accessor_given(self):
     try:
         get_s3('s3://example.com/file1.csv', {'key': 'value'})
     except TypeError as exc:
         self.assertIn('must be callable', str(exc))
Exemplo n.º 3
0
 def test_raises_TypeError_if_empty_account_accessor_given(self):
     try:
         get_s3('s3://example.com/file1.csv', None)
     except TypeError as exc:
         self.assertIn('must be callable', str(exc))