Exemplo n.º 1
0
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
Exemplo n.º 2
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")
Exemplo n.º 3
0
def test_remove_raises(status_raw_empty):
    status = MySQLStatus(status_raw_empty)
    with pytest.raises(StatusKeyNotFound):
        status.remove("foo")
Exemplo n.º 4
0
def test_remove_raises(status_raw_empty):
    status = MySQLStatus(status_raw_empty)
    assert status.valid
    with pytest.raises(StatusKeyNotFound):
        status.remove("daily", "foo")