I am quite sure this will throw a python error, it shall be self.assertIn(expectation, dict(metadata), message), right?