Project

General

Profile

0001-tests-update-data_source-tests-10920.patch

Serghei Mihai, 13 May 2016 02:16 PM

Download (1.05 KB)

View differences:

Subject: [PATCH] tests: update data_source tests (#10920)

 tests/test_datasource.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/test_datasource.py
256 256
    assert data_source2.data_source == data_source.data_source
257 257
    with mock.patch('wcs.data_sources.urllib2') as urllib2:
258 258
        urllib2.urlopen.return_value.read.return_value = \
259
                '{"data": [{"id": 1, "text": "uné"}, {"id": 2, "text": "deux"}]}'
259
                '{"data": [{"id": 0, "text": "zéro"}, {"id": 1, "text": "uné"}, {"id": 2, "text": "deux"}]}'
260 260
        assert data_sources.get_items({'type': 'foobar'}) == [
261
            ('0', 'zéro', '0'),
261 262
            ('1', 'uné', '1'),
262 263
            ('2', 'deux', '2'),
263 264
        ]
264
-