def test_add_file_can_add_multiple(mock_exists): state = State() for i in range(10): result = state.add_osm_file('testfile{}'.format(i)) assert FileAddResult.SUCCESS == result assert 10 == len(state.osm_files) for i in range(10): assert path.abspath('testfile{}'.format(i)) in state.osm_files
def test_add_file_when_doesnt_exist(mock_exists): state = State() result = state.add_osm_file('mylittletestfile') mock_exists.assert_called() assert result == FileAddResult.DOESNT_EXIST assert 0 == len(state.osm_files)