def test_storage_changed_with_relation_data(self): self.test_relation.set({ 'swift_hash': 'foo_hash', 'rings_url': 'http://swift-proxy.com/rings/', }) hooks.swift_storage_relation_changed() self.CONFIGS.write.assert_called_with('/etc/swift/swift.conf') self.fetch_swift_rings.assert_called_with( 'http://swift-proxy.com/rings/' )
def test_storage_changed_missing_relation_data(self, exit): hooks.swift_storage_relation_changed() exit.assert_called_with(0)