Beispiel #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
Beispiel #2
0
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())
Beispiel #3
0
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())
Beispiel #4
0
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
Beispiel #5
0
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
Beispiel #6
0
 def __init__(self):
     from dulwich.config import ConfigFile
     BaseRepo.__init__(self, MemoryObjectStore(), DictRefsContainer({}))
     self._named_files = {}
     self.bare = True
     self._config = ConfigFile()
Beispiel #7
0
 def __init__(self):
     BaseRepo.__init__(self, MemoryObjectStore(), DictRefsContainer({}))
     self._named_files = {}
     self.bare = True