def test_form_choices(self):
        """ the form should get its choices from the workflow """
        form = Type1Type.form(parent=Node.root())
        wfclass = core.workflow[Type1Type]

        assert form.workflow_choices() == wfclass.states
        assert form.workflow_default() == wfclass.default
 def test_form_choices_instance(self, client):
     """ and it's value should be taken from the instance """
     data = Type1(state="published")
     data.save()
     form = Type1Type.form(parent=Node.root(), instance=data)
     assert form['state'].value() == "published"