def test_validation(self):

        test_obj = Visualization()
        with nt.assert_raises(ValidationError) as err:
            test_obj.validate()
        nt.assert_equal(err.exception.args[0],
                        'data must be defined for valid visualization')

        test_obj.data = [Data(name='test'), Data(name='test')]
        with nt.assert_raises(ValidationError) as err:
            test_obj.validate()
        nt.assert_equal(err.exception.args[0],
                        'data has duplicate names')
Test Visualization validation
dataset/ETHPy150Open wrobstory/vincent/tests/test_vega.py/TestVisualization.test_validation