def test_mandatory_exception(self): """Raise an error when the content is empty""" try: tra = ExportTra() tra._mandatory('', 10) pytest.fail('An empty content mandatory must raise and error') except MandatoryException: pass
def test_mandatory_standard(self): tra = ExportTra() content = tra._mandatory('OK', 10) assert len(content) == 10