Assert that the actual object matches the expected object.
(self, actual, expected)
| 171 | self.run_operation(op) |
| 172 | |
| 173 | def check_object(self, actual, expected): |
| 174 | """Assert that the actual object matches the expected object.""" |
| 175 | self.assertEqual(type(actual), OBJECT_TYPES[expected["type"]]) |
| 176 | for attr, expected_val in expected.items(): |
| 177 | if attr == "type": |
| 178 | continue |
| 179 | c2s = camel_to_snake(attr) |
| 180 | if c2s == "interrupt_in_use_connections": |
| 181 | c2s = "interrupt_connections" |
| 182 | actual_val = getattr(actual, c2s) |
| 183 | if expected_val == 42: |
| 184 | self.assertIsNotNone(actual_val) |
| 185 | else: |
| 186 | self.assertEqual(actual_val, expected_val) |
| 187 | |
| 188 | def check_event(self, actual, expected): |
| 189 | """Assert that the actual event matches the expected event.""" |
no test coverage detected