Example #1
0
def test_Store_dot_filter_returns_new_store_with_matching_records_removed():
    """Tests that the Store's filter method returns a new Store with
    any records matching desc removed."""
    store = _create_store()
    filtered = store.filter({"this": "bar"})
    assert len(filtered) == (len(store) - 1)
    assert len(filtered.find({"this": "bar"})) == 0
Example #2
0
def test_Store_dot_filter_returns_new_store_with_matching_records_removed():
    """Tests that the Store's filter method returns a new Store with
    any records matching desc removed."""
    store = _create_store()
    filtered = store.filter({"this": "bar"})
    assert len(filtered) == (len(store) - 1)
    assert len(filtered.find({"this": "bar"})) == 0
Example #3
0
def test_Store_dot_filter_uses_all_of_finds_functionality():
    store = _create_store()
    filtered = store.filter(
        {"this": "bar"}, sanitize_list=["that"], encrypt_list=["this"], password="******", order_by="that"
    )
    assert isinstance(filtered, Store)
    assert len(filtered) == (len(store) - 1)
    assert len(filtered.find({"this": "that"})) == 0
Example #4
0
def test_Store_dot_filter_uses_all_of_finds_functionality():
    store = _create_store()
    filtered = store.filter({"this": "bar"},
                            sanitize_list=["that"],
                            encrypt_list=["this"],
                            password="******",
                            order_by="that")
    assert isinstance(filtered, Store)
    assert len(filtered) == (len(store) - 1)
    assert len(filtered.find({"this": "that"})) == 0