def test_SAT_export(self): tra = ExportTra() tra.setHeader('S5', 'CLI', 'JRL') tra.addSAT('PROJ1', 'Projet1', 'Axe1') content = tra._content['lines'][0] assert content[:3] == '***', 'Bad starting record!' assert len(content) == 251, 'SAT Line in 007 format must containt 251 characters' assert content[248:] == 'M ', 'Sens field must be set with M by default'
def test_SAT_mandatory(self): try: tra = ExportTra() tra.setHeader('S5', 'CLI', 'JRL') tra.addSAT('PROJ1', 'Projet1') pytest.fail('Axe content is mandatory, missing value must be raise and error') except MandatoryException: pass
def test_SAT_mandatory(self): try: tra = ExportTra() tra.setHeader('S5', 'CLI', 'JRL') tra.addSAT('PROJ1', 'Projet1') pytest.fail( 'Axe content is mandatory, missing value must be raise and error' ) except MandatoryException: pass
def test_SAT_export(self): tra = ExportTra() tra.setHeader('S5', 'CLI', 'JRL') tra.addSAT('PROJ1', 'Projet1', 'Axe1') content = tra._content['lines'][0] assert content[:3] == '***', 'Bad starting record!' assert len( content ) == 251, 'SAT Line in 007 format must containt 251 characters' assert content[ 248:] == 'M ', 'Sens field must be set with M by default'