MCPcopy
hub / github.com/eudicots/Cactus / test_write

Method test_write

cactus/tests/test_config.py:54–69  ·  view source on GitHub ↗

Check that the config router writes correctly to the filesystem

(self)

Source from the content-addressed store, hash-verified

52 self.assertEqual(4, router.get("b"))
53
54 def test_write(self):
55 """
56 Check that the config router writes correctly to the filesystem
57 """
58 router = ConfigRouter([self.path1, self.path2])
59 router.set("a", 3)
60 router.set("b", 4)
61 router.write()
62
63 self.conf1.load()
64 self.conf2.load()
65
66 self.assertEqual(self.conf1.get("a"), 3)
67 self.assertEqual(self.conf1.get("b"), None)
68 self.assertEqual(self.conf2.get("b"), 4)
69 self.assertEqual(self.conf2.get("a"), None)
70
71 def test_collision(self):
72 """

Callers

nothing calls this directly

Calls 5

setMethod · 0.95
writeMethod · 0.95
ConfigRouterClass · 0.90
loadMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected