The pop method should remove and return values.
()
| 136 | |
| 137 | |
| 138 | async def test_storage_pop(): |
| 139 | """ |
| 140 | The pop method should remove and return values. |
| 141 | """ |
| 142 | test_store["a"] = 1 |
| 143 | test_store["b"] = 2 |
| 144 | |
| 145 | value = test_store.pop("a") |
| 146 | assert value == 1 |
| 147 | assert "a" not in test_store |
| 148 | assert len(test_store) == 1 |
| 149 | |
| 150 | # Pop with default. |
| 151 | value = test_store.pop("missing", "default") |
| 152 | assert value == "default" |
| 153 | |
| 154 | |
| 155 | async def test_storage_persistence(): |