Exemple #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
Exemple #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
Exemple #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
Exemple #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
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
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