@patch('flask_views.db.mongoengine.edit.super', create=True)
    def test_form_valid_with_object(self, super_mock):
        super_class = Mock()
        super_class.form_valid.return_value = 'form-valid'
        super_mock.return_value = super_class

        form = Mock()
        mixin = ModelFormMixin()
        mixin.object = Mock()

        self.assertEqual('form-valid', mixin.form_valid(form))
        form.populate_obj.assert_called_once_with(mixin.object)
        mixin.object.save.assert_called_once_with()
        super_mock.assert_called_once_with(ModelFormMixin, mixin)
        super_class.form_valid.assert_called_once_with(form)
Convert mpl marker symbol to plotly symbol and return symbol.
dataset/ETHPy150Open brocaar/flask-views/flask_views/tests/unit/db/mongoengine/test_edit.py/ModelFormMixinTestCase.test_form_valid_with_object--crossover with--dataset/ETHPy150Open plotly/plotly.py/plotly/matplotlylib/mpltools.py/convert_symbol