Пример #1
0
 def test_set_available_without_being_unavailable_must_raise(self):
     m = {"n": 0}
     s = Storage(0, "0", True, m)
     with pytest.raises(SystemError) as excinfo:
         s._set_available()
     assert "unavailable" in str(excinfo.value)
Пример #2
0
 def test_set_available(self):
     s = Storage(0, "0")
     s._set_unavailable()
     s._set_available()
     assert not s.is_unavailable