Example #1
0
def test_ensure_list_field_missing():
    builder = ConferenceBuilder()

    assert 'list_field' not in builder.record

    builder._ensure_list_field('list_field')

    assert 'list_field' in builder.record
    assert builder.record['list_field'] == []
Example #2
0
def test_ensure_list_on_existing():
    builder = ConferenceBuilder()

    builder._ensure_list_field('_collections')

    assert builder.record['_collections'] == ['Conferences']