(self)
| 379 | assert copy.get("TEST_LIST_OF_LISTS")[0] == ["first_one", "first_two"] |
| 380 | |
| 381 | def test_copy_to_dict(self): |
| 382 | s = BaseSettings( |
| 383 | { |
| 384 | "TEST_STRING": "a string", |
| 385 | "TEST_LIST": [1, 2], |
| 386 | "TEST_BOOLEAN": False, |
| 387 | "TEST_BASE": BaseSettings({1: 1, 2: 2}, "project"), |
| 388 | "TEST": BaseSettings({1: 10, 3: 30}, "default"), |
| 389 | "HASNOBASE": BaseSettings({3: 3000}, "default"), |
| 390 | } |
| 391 | ) |
| 392 | assert s.copy_to_dict() == { |
| 393 | "HASNOBASE": {3: 3000}, |
| 394 | "TEST": {1: 10, 3: 30}, |
| 395 | "TEST_BASE": {1: 1, 2: 2}, |
| 396 | "TEST_LIST": [1, 2], |
| 397 | "TEST_BOOLEAN": False, |
| 398 | "TEST_STRING": "a string", |
| 399 | } |
| 400 | |
| 401 | def test_freeze(self): |
| 402 | self.settings.freeze() |
nothing calls this directly
no test coverage detected