def test_remove(status_raw_empty): status = MySQLStatus(status_raw_empty) copy = MySQLCopy('foo', 'daily', 'some_file.txt', type='full') status.add(copy) assert len(status.daily) == 1 status.remove(copy.key) assert len(status.daily) == 0
def test_remove_raises_when_wrong_period(status_raw_empty): status = MySQLStatus(status_raw_empty) assert status.valid with pytest.raises(StatusError): status.remove("minutely", "foo")
def test_remove_raises(status_raw_empty): status = MySQLStatus(status_raw_empty) with pytest.raises(StatusKeyNotFound): status.remove("foo")
def test_remove_raises(status_raw_empty): status = MySQLStatus(status_raw_empty) assert status.valid with pytest.raises(StatusKeyNotFound): status.remove("daily", "foo")