Ejemplo n.º 1
0
def test_get_data(get_object):
    result = BaseTestDataRestView.get_data({'data': {'test': 1},
                                            'objects': {
                                                'test_2': 'app.model:1',
                                                'test_3': ['app.model:1'],
                                            }})
    get_object.assert_called_with('app.model:1')
    assert_equal(result, {
        'test': 1,
        'test_2': get_object(),
        'test_3': [get_object()]
    })