0001-tests-update-data_source-tests-10920.patch
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 |
- |