Beispiel #1
0
def test_reindex_hh_dupliate_key_error():
    hh = Household('1')
    for j in ['1', 'test_1']:
        hh.add(Person(j))
    with pytest.raises(KeyError):
        hh.reindex("test_")
Beispiel #2
0
def test_reindex_hh():
    hh = Household('1')
    for j in ['1', '2']:
        hh.add(Person(j))
    hh.reindex("test_")
    assert set(hh.people) == {'test_1', 'test_2'}