def test_add_assertions_on_non_list_or_dict(self): """When provided an invalid type, add_assertions raises an error.""" with self.assertRaises(TypeError) as context_manager: add_assertions(assertions="I'm Not Valid") self.assertEqual( "assertion parameter was not a list or dict: I'm Not Valid", str(context_manager.exception))
def test_add_assertions_on_empty_list(self, m_subp): """When provided with an empty list, add_assertions does nothing.""" add_assertions([]) self.assertEqual("", self.logs.getvalue()) m_subp.assert_not_called()
def test_add_assertions_on_empty_list(self, m_subp): """When provided with an empty list, add_assertions does nothing.""" add_assertions([]) self.assertEqual('', self.logs.getvalue()) m_subp.assert_not_called()