mirror of
https://github.com/samba-team/samba.git
synced 2025-01-17 02:05:21 +03:00
r26107: Add more tests.
(This used to be commit afa5f7c9e9fe29aaec0a5e3f9cda9d7567b3b254)
This commit is contained in:
parent
e4168bb0e0
commit
86be3d2f61
@ -95,3 +95,25 @@ class SimpleTdbTests(TestCase):
|
||||
self.tdb["bla"] = "hoi"
|
||||
i = iter(self.tdb)
|
||||
self.assertEquals(set(["bloe", "bla"]), set([i.next(), i.next()]))
|
||||
|
||||
def test_keys(self):
|
||||
self.tdb["bloe"] = "2"
|
||||
self.tdb["bla"] = "25"
|
||||
self.assertEquals(["bla", "bloe"], self.tdb.keys())
|
||||
|
||||
def test_values(self):
|
||||
self.tdb["bloe"] = "2"
|
||||
self.tdb["bla"] = "25"
|
||||
self.assertEquals(["25", "2"], self.tdb.values())
|
||||
|
||||
def test_clear(self):
|
||||
self.tdb["bloe"] = "2"
|
||||
self.tdb["bla"] = "25"
|
||||
self.assertEquals(2, len(self.tdb))
|
||||
self.tdb.clear()
|
||||
self.assertEquals(0, len(self.tdb))
|
||||
|
||||
def test_len(self):
|
||||
self.assertEquals(0, len(self.tdb))
|
||||
self.tdb["entry"] = "value"
|
||||
self.assertEquals(1, len(self.tdb))
|
||||
|
Loading…
x
Reference in New Issue
Block a user