def test_function_invalid(self):
     try:
         composer.value(lambda: {})
     except composer.ComposerError as error:
         assert error.message.startswith('Invalid argument')
 def test_dict(self):
     composer.value({'foo': 42})
 def test_number(self):
     composer.value(42)
 def test_string(self):
     composer.value('foo')
 def test_boolean(self):
     composer.value(True)