Ejemplo n.º 1
0
 def test_resolve_form_invalid(self):
     # Given
     tag = 'this_is_not_a_valid_form'
     # When
     with self.assertRaises(TypeError) as error:
         _Envelope._resolve_form(tag)
     # Then
     message = error.exception.args[0]
     self.assertEqual(message, 'Invalid form tag: this_is_not_a_valid_form')
Ejemplo n.º 2
0
 def test_resolve_form_command(self):
     # Given
     tag = 'command'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _CommandMessageForm)
Ejemplo n.º 3
0
 def test_resolve_form_event(self):
     # Given
     tag = 'event'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _EventMessageForm)
Ejemplo n.º 4
0
 def test_resolve_form_unlinked(self):
     # Given
     tag = 'unlinked'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _UnlinkedResponseForm)
Ejemplo n.º 5
0
 def test_resolve_form_link(self):
     # Given
     tag = 'link'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _LinkRequestForm)
Ejemplo n.º 6
0
 def test_resolve_form_sync(self):
     # Given
     tag = 'sync'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _SyncRequestForm)