'Test that credentials are saved in the manager'

def test_credentials_manager(self):

    class DummyCredentialsManager(object, ):
        saved = False
        def get_credentials(self):
            return {'access_key': '123', 'secret_key': '456'}
        def save_credentials(self):
            self.saved = True
    self.site.deployment_engine.credentials_manager = DummyCredentialsManager()
    self.site.config.set('aws-bucket-name', 'website')
    self.site.upload()
    self.assertTrue(self.site.deployment_engine.credentials_manager.saved)
