Exemplo n.º 1
0
 def test_invalid_refname(self):
     text = _TEST_REFS_SERIALIZED + '00' * 20 + '\trefs/stash\n'
     refs = InfoRefsContainer(StringIO(text))
     expected_refs = dict(_TEST_REFS)
     del expected_refs['HEAD']
     expected_refs["refs/stash"] = "00" * 20
     self.assertEqual(expected_refs, refs.as_dict())
Exemplo n.º 2
0
 def test_invalid_refname(self):
     text = _TEST_REFS_SERIALIZED + '00' * 20 + '\trefs/stash\n'
     refs = InfoRefsContainer(StringIO(text))
     expected_refs = dict(_TEST_REFS)
     del expected_refs['HEAD']
     expected_refs["refs/stash"] = "00" * 20
     self.assertEquals(expected_refs, refs.as_dict())
Exemplo n.º 3
0
 def test_as_dict(self):
     refs = InfoRefsContainer(StringIO(_TEST_REFS_SERIALIZED))
     # refs/heads/loop does not show up even if it exists
     expected_refs = dict(_TEST_REFS)
     del expected_refs['HEAD']
     self.assertEqual(expected_refs, refs.as_dict())
Exemplo n.º 4
0
 def test_as_dict(self):
     refs = InfoRefsContainer(StringIO(_TEST_REFS_SERIALIZED))
     # refs/heads/loop does not show up even if it exists
     expected_refs = dict(_TEST_REFS)
     del expected_refs['HEAD']
     self.assertEqual(expected_refs, refs.as_dict())