44
37
self.map.lookup_git_sha, "5686645d49063c73d35436192dfc9a160c672301")
46
39
def test_blob(self):
47
thesha = "5686645d49063c73d35436192dfc9a160c672301"
48
self.map.add_entry(thesha, "blob", ("myfileid", "myrevid"))
40
self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301",
41
"blob", ("myfileid", "myrevid"))
50
43
("blob", ("myfileid", "myrevid")),
51
self.map.lookup_git_sha(thesha))
52
self.assertEquals(thesha, self.map.lookup_blob("myfileid", "myrevid"))
44
self.map.lookup_git_sha("5686645d49063c73d35436192dfc9a160c672301"))
54
46
def test_tree(self):
55
thesha = "5686645d49063c73d35436192dfc9a160c672301"
56
self.map.add_entry(thesha,
47
self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301",
57
48
"tree", ("somepath", "myrevid"))
59
50
("tree", ("somepath", "myrevid")),
60
self.map.lookup_git_sha(thesha))
61
self.assertEquals(thesha, self.map.lookup_tree("somepath", "myrevid"))
51
self.map.lookup_git_sha("5686645d49063c73d35436192dfc9a160c672301"))
63
53
def test_revids(self):
64
54
self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301",
79
69
TestCase.setUp(self)
80
70
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")