コード例 #1
0
ファイル: test_stanza.py プロジェクト: yurimataev/aioxmpp
 def test_registers_class(self):
     Cls = stanza.make_application_error(
         "TestError",
         ("uri:foo", "bar"),
     )
     self.assertSequenceEqual(self._as_application_condition.mock_calls,
                              [unittest.mock.call(Cls)])
コード例 #2
0
ファイル: test_stanza.py プロジェクト: kostyll/aioxmpp
 def test_creates_xso_class(self):
     Cls = stanza.make_application_error(
         "TestError",
         ("uri:foo", "bar"),
     )
     self.assertTrue(issubclass(Cls, xso.XSO))
     self.assertIsInstance(Cls, xso.model.XMLStreamClass)
     self.assertEqual(Cls.TAG, ("uri:foo", "bar"))
     self.assertEqual(Cls.__name__, "TestError")
コード例 #3
0
 def test_creates_xso_class(self):
     Cls = stanza.make_application_error(
         "TestError",
         ("uri:foo", "bar"),
     )
     self.assertTrue(issubclass(Cls, xso.XSO))
     self.assertIsInstance(Cls, xso.model.XMLStreamClass)
     self.assertEqual(Cls.TAG, ("uri:foo", "bar"))
     self.assertEqual(Cls.__name__, "TestError")
コード例 #4
0
 def test_registers_class(self):
     Cls = stanza.make_application_error(
         "TestError",
         ("uri:foo", "bar"),
     )
     self.assertSequenceEqual(
         self._as_application_condition.mock_calls,
         [
             unittest.mock.call(Cls)
         ]
     )