예제 #1
0
def test_element_exists():
    lww_element_set = LWWElementSet()
    lww_element_set.add('value1', 1)
    assert lww_element_set.contains('value1')
예제 #2
0
def test_remove_bias():
    lww_element_set = LWWElementSet(bias='remove')
    lww_element_set.add('value1', 1)
    lww_element_set.remove('value1', 1)
    assert not lww_element_set.contains('value1')
예제 #3
0
def test_element_added_after_removal():
    lww_element_set = LWWElementSet()
    lww_element_set.remove('value1', 1)
    lww_element_set.add('value1', 2)
    assert lww_element_set.contains('value1')
예제 #4
0
def test_add_bias():
    lww_element_set = LWWElementSet()
    lww_element_set.add('value1', 1)
    lww_element_set.remove('value1', 1)
    assert lww_element_set.contains('value1')
예제 #5
0
def test_element_removed_after_insertion():
    lww_element_set = LWWElementSet()
    lww_element_set.add('value1', 1)
    lww_element_set.remove('value1', 2)
    assert not lww_element_set.contains('value1')