Project

General

Profile

0011-tests-mark-some-base_adresse-tests-as-expected-to-fa.patch

Benjamin Dauvergne, 08 Feb 2019 08:43 AM

Download (2.07 KB)

View differences:

Subject: [PATCH 11/13] tests: mark some base_adresse tests as expected to fail
 (#30458)

 tests/test_base_adresse.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
tests/test_base_adresse.py
169 169
    mocked_get.assert_called_once_with('http://bano.openstreetmap.fr/BAN_odbl/BAN_odbl_73-json.bz2')
170 170
    streets = StreetModel.objects.all()
171 171
    assert len(streets) == 3
172
    street = StreetModel.objects.get(id=1)
172
    street = StreetModel.objects.order_by('id').first()
173 173
    assert street.name == 'Chemin de la Vie, LA GRANGE DU TRIEU'
174 174
    assert street.zipcode == '73610'
175 175
    assert street.type == 'street'
......
202 202
    assert StreetModel.objects.count() == 2
203 203

  
204 204

  
205
@pytest.mark.xfail(
206
    "os.environ.get('DB_ENGINE') == 'django.db.backends.postgresql_psycopg2'",
207
    reason='zipcode is not large enough to accomodate multiple values on PG')
205 208
@mock.patch('passerelle.utils.Request.get')
206 209
def test_base_adresse_command_update_corsica(mocked_get, db, base_adresse_corsica):
207 210
    filepath = os.path.join(os.path.dirname(__file__), 'data', 'update_streets_test.bz2')
......
213 216
    assert StreetModel.objects.count() == 0
214 217

  
215 218

  
219
@pytest.mark.xfail(
220
    "os.environ.get('DB_ENGINE') == 'django.db.backends.postgresql_psycopg2'",
221
    reason='zipcode is not large enough to accomodate multiple values on PG')
216 222
@mock.patch('passerelle.utils.Request.get')
217 223
def test_base_adresse_command_update_multiple(mocked_get, db, base_adresse_multiple):
218 224
    filepath = os.path.join(os.path.dirname(__file__), 'data', 'update_streets_test.bz2')
219
-