- self._ec.log_level = 'zoom'
-
- def test_eq(self):
- ec1 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- ec2 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- self.assertEqual(ec1, ec2)
-
- def test_ne_name(self):
- ec1 = bt2.EventClass(name='name1', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- ec2 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- self.assertNotEqual(ec1, ec2)
-
- def test_ne_id(self):
- ec1 = bt2.EventClass(name='name', id=24,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- ec2 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- self.assertNotEqual(ec1, ec2)
-
- def test_ne_context_field_class(self):
- ec1 = bt2.EventClass(name='name', id=23,
- context_field_class=self._payload_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- ec2 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- self.assertNotEqual(ec1, ec2)
-
- def test_ne_payload_field_class(self):
- ec1 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._context_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- ec2 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- self.assertNotEqual(ec1, ec2)
-
- def test_ne_emf_uri(self):
- ec1 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- ec2 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my UR',
- log_level=bt2.EventClassLogLevel.WARNING)
- self.assertNotEqual(ec1, ec2)
-
- def test_ne_log_level(self):
- ec1 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.WARNING)
- ec2 = bt2.EventClass(name='name', id=23,
- context_field_class=self._context_fc,
- payload_field_class=self._payload_fc,
- emf_uri='my URI',
- log_level=bt2.EventClassLogLevel.ERROR)
- self.assertNotEqual(ec1, ec2)
-
- def test_eq_invalid(self):
- self.assertFalse(self._ec == 23)