예제 #1
0
 def __init__(self):
     from dulwich.config import ConfigFile
     self._reflog = []
     refs_container = DictRefsContainer({}, logger=self._append_reflog)
     BaseRepo.__init__(self, MemoryObjectStore(), refs_container)
     self._named_files = {}
     self.bare = True
     self._config = ConfigFile()
     self._description = None
예제 #2
0
파일: test_refs.py 프로젝트: tgalal/dulwich
class DictRefsContainerTests(RefsContainerTests, TestCase):
    def setUp(self):
        TestCase.setUp(self)
        self._refs = DictRefsContainer(dict(_TEST_REFS))

    def test_invalid_refname(self):
        # FIXME: Move this test into RefsContainerTests, but requires
        # some way of injecting invalid refs.
        self._refs._refs[b'refs/stash'] = b'00' * 20
        expected_refs = dict(_TEST_REFS)
        expected_refs[b'refs/stash'] = b'00' * 20
        self.assertEqual(expected_refs, self._refs.as_dict())
예제 #3
0
파일: test_refs.py 프로젝트: lelit/dulwich
class DictRefsContainerTests(RefsContainerTests, TestCase):
    def setUp(self):
        TestCase.setUp(self)
        self._refs = DictRefsContainer(dict(_TEST_REFS))

    def test_invalid_refname(self):
        # FIXME: Move this test into RefsContainerTests, but requires
        # some way of injecting invalid refs.
        self._refs._refs[b"refs/stash"] = b"00" * 20
        expected_refs = dict(_TEST_REFS)
        expected_refs[b"refs/stash"] = b"00" * 20
        self.assertEqual(expected_refs, self._refs.as_dict())
예제 #4
0
파일: test_refs.py 프로젝트: tgalal/dulwich
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
예제 #5
0
파일: test_refs.py 프로젝트: PKRoma/dulwich
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
예제 #6
0
 def __init__(self):
     from dulwich.config import ConfigFile
     BaseRepo.__init__(self, MemoryObjectStore(), DictRefsContainer({}))
     self._named_files = {}
     self.bare = True
     self._config = ConfigFile()
예제 #7
0
파일: repo.py 프로젝트: zbal/dulwich
 def __init__(self):
     BaseRepo.__init__(self, MemoryObjectStore(), DictRefsContainer({}))
     self._named_files = {}
     self.bare = True