Test that we don't throw on a missing file, and that the configuration remains in a consistent state.
(self)
| 125 | self.assertEqual("canary", f.read()) |
| 126 | |
| 127 | def test_missing_file(self): |
| 128 | """ |
| 129 | Test that we don't throw on a missing file, and that the configuration |
| 130 | remains in a consistent state. |
| 131 | """ |
| 132 | wrong_path = os.path.join(self.path, "does_not_exist.json") |
| 133 | |
| 134 | self.conf1.set("context", {"k1":"v1"}) |
| 135 | self.conf1.write() |
| 136 | |
| 137 | router = ConfigRouter([wrong_path, self.path1]) |
| 138 | |
| 139 | self.assertEqual(router.get("context").get("k1"), "v1") |
| 140 | |
| 141 | def test_broken_file(self): |
| 142 | """ |
nothing calls this directly
no test coverage detected