예제 #1
0
파일: tests.py 프로젝트: priestd09/backtrac
    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)
예제 #2
0
 def create_item(self, path, type):
     item_created.send(sender=self.client_obj, path=path, type=type,
                       client=self.client_obj)