'When an attribute required in a given state isn\'t provided,
``InvariantException`` is raised.
:param args: A valid dict of attributes for ``AlgebraicType``.
:param choice: A choice function'

@given(args=ALGEBRAIC_TYPE_ARGUMENTS_STRATEGY, choice=st.choices())
@example(args={'state': States.WITH_ATTRIBUTE, 'extra': False, 'one': True}, choice=(lambda _: 'one'))
@example(args={'state': States.WITH_TWO_ATTRIBUTES, 'extra': False, 'one': True, 'two': False}, choice=(lambda _: 'one'))
@example(args={'state': States.WITH_TWO_ATTRIBUTES, 'extra': False, 'one': True, 'two': False}, choice=(lambda _: 'two'))
def test_missing_attributes(self, args, choice):

    state = args['state']
    invariant = AlgebraicType.__invariant__
    required_attributes = invariant.attributes_for_tag[state]
    assume(required_attributes)
    removed_attribute = choice(sorted(required_attributes))
    del args[removed_attribute]
    exc = self.assertRaises(InvariantException, AlgebraicType, **args)
    self.assertIn('must    be    specified    in    state', exc.invariant_errors[0])
