37
44
self.map.lookup_git_sha, "5686645d49063c73d35436192dfc9a160c672301")
39
46
def test_blob(self):
40
self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301",
41
"blob", ("myfileid", "myrevid"))
47
thesha = "5686645d49063c73d35436192dfc9a160c672301"
48
self.map.add_entry(thesha, "blob", ("myfileid", "myrevid"))
43
50
("blob", ("myfileid", "myrevid")),
44
self.map.lookup_git_sha("5686645d49063c73d35436192dfc9a160c672301"))
51
self.map.lookup_git_sha(thesha))
52
self.assertEquals(thesha, self.map.lookup_blob("myfileid", "myrevid"))
46
54
def test_tree(self):
47
self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301",
55
thesha = "5686645d49063c73d35436192dfc9a160c672301"
56
self.map.add_entry(thesha,
48
57
"tree", ("somepath", "myrevid"))
50
59
("tree", ("somepath", "myrevid")),
51
self.map.lookup_git_sha("5686645d49063c73d35436192dfc9a160c672301"))
60
self.map.lookup_git_sha(thesha))
61
self.assertEquals(thesha, self.map.lookup_tree("somepath", "myrevid"))
53
63
def test_revids(self):
54
64
self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301",
69
79
TestCase.setUp(self)
70
80
self.map = SqliteGitShaMap()
83
class TdbGitShaMapTests(TestCaseInTempDir,TestGitShaMap):
86
TestCaseInTempDir.setUp(self)
88
self.map = TdbGitShaMap(os.path.join(self.test_dir, 'foo.tdb'))
90
raise UnavailableFeature("Missing tdb")