Exemplo n.º 1
0
def test_sync_destination_name_not_in_str_gives_correct_json_representation():
    items = [
        SyncDestination.GOOGLE_DRIVE, SyncDestination.BOX,
        SyncDestination.ICLOUD
    ]
    _filter = SyncDestination.not_in(items)
    expected = NOT_IN.format("syncDestination", *sorted(items))
    assert str(_filter) == expected
Exemplo n.º 2
0
def test_sync_destination_choices_returns_valid_attributes():
    choices = SyncDestination.choices()
    valid_set = {
        "ICloud",
        "Box",
        "BoxDrive",
        "GoogleDrive",
        "GoogleBackupAndSync",
        "Dropbox",
        "OneDrive",
    }
    assert set(choices) == valid_set
Exemplo n.º 3
0
def test_sync_destination_name_not_eq_str_gives_correct_json_representation():
    _filter = SyncDestination.not_eq(SyncDestination.GOOGLE_DRIVE)
    expected = IS_NOT.format("syncDestination", SyncDestination.GOOGLE_DRIVE)
    assert str(_filter) == expected
Exemplo n.º 4
0
def test_sync_destination_name_not_exists_str_gives_correct_json_representation(
):
    _filter = SyncDestination.not_exists()
    expected = NOT_EXISTS.format("syncDestination")
    assert str(_filter) == expected
Exemplo n.º 5
0
def test_sync_destination_name_not_in_str_gives_correct_json_representation():
    items = ["dest1", "dest2", "dest3"]
    _filter = SyncDestination.not_in(items)
    expected = NOT_IN.format("syncDestination", *items)
    assert str(_filter) == expected
Exemplo n.º 6
0
def test_sync_destination_name_eq_str_gives_correct_json_representation():
    _filter = SyncDestination.eq("test_dest")
    expected = IS.format("syncDestination", "test_dest")
    assert str(_filter) == expected