コード例 #1
0
ファイル: test_remove.py プロジェクト: sapisuper/backup
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
コード例 #2
0
ファイル: test_remove.py プロジェクト: tricloud/backup
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")
コード例 #3
0
ファイル: test_remove.py プロジェクト: sapisuper/backup
def test_remove_raises(status_raw_empty):
    status = MySQLStatus(status_raw_empty)
    with pytest.raises(StatusKeyNotFound):
        status.remove("foo")
コード例 #4
0
ファイル: test_remove.py プロジェクト: tricloud/backup
def test_remove_raises(status_raw_empty):
    status = MySQLStatus(status_raw_empty)
    assert status.valid
    with pytest.raises(StatusKeyNotFound):
        status.remove("daily", "foo")