+ def test_attr_name(self):
+ trace = self._tc(name='mein trace')
+ self.assertEqual(trace.name, 'mein trace')
+
+ def test_attr_uuid(self):
+ trace = self._tc(uuid=uuid.UUID('da7d6b6f-3108-4706-89bd-ab554732611b'))
+ self.assertEqual(trace.uuid, uuid.UUID('da7d6b6f-3108-4706-89bd-ab554732611b'))
+
+ def test_env_get(self):
+ trace = self._tc(env={'hello': 'you', 'foo': -5})
+ self.assertEqual(trace.env['hello'], 'you')
+ self.assertEqual(trace.env['foo'], -5)
+
+ def test_env_get_non_existent(self):
+ trace = self._tc(env={'hello': 'you', 'foo': -5})
+
+ with self.assertRaises(KeyError):
+ trace.env['lel']
+