

def test_add_already_existing(self):
    '\n        Tests that adding an image with an existing identifier\n        raises an appropriate exception\n        '
    self.store = Store(self.conf)
    self.store.configure()
    image_swift = six.BytesIO(b'nevergonnamakeit')
    self.assertRaises(exceptions.Duplicate, self.store.add, FAKE_UUID, image_swift, 0)

dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py SwiftTests.test_add_already_existing/original