def test_item_created_signal(self): """ Test that the catalog.models.item_created signal does not raise an IntegrityError if a directory and a file are created with the same path. """ from backtrac.apps.catalog.models import item_created item_created.send(sender=None, path=self.path, type='f', client=self.client) item_created.send(sender=None, path=self.path, type='d', client=self.client)
def create_item(self, path, type): item_created.send(sender=self.client_obj, path=path, type=type, client=self.client_obj)