def setUp(self): super(ApiTestCase, self).setUp() self.repo_data = repo_fixtures.network(self._base) for name, hgrepo in self.repo_data["repos"].iteritems(): dbrepo = Repository.objects.create(name=name, url="http://localhost:8001/%s/" % name) for i in hgrepo: get_or_create_changeset(dbrepo, hgrepo, hgrepo[i].hex())
def setUp(self): super(ApiTestCase, self).setUp() self.repo_data = repo_fixtures.network(self._base) for name, hgrepo in self.repo_data['repos'].iteritems(): dbrepo = Repository.objects.create( name=name, url='http://localhost:8001/%s/' % name) for i in hgrepo: get_or_create_changeset(dbrepo, hgrepo, hgrepo[i].hex())
def setUp(self): super(ApiTestCase, self).setUp() self._old_repository_base = getattr(settings, "REPOSITORY_BASE", None) self._base = settings.REPOSITORY_BASE = tempfile.mkdtemp() self.repo_data = repo_fixtures.network(self._base) for name, hgrepo in self.repo_data["repos"].iteritems(): dbrepo = Repository.objects.create(name=name, url="http://localhost:8001/%s/" % name) for i in hgrepo: get_or_create_changeset(dbrepo, hgrepo, hgrepo[i].hex())