def shouldPostExceptionInParameterCellIfSymbolMissing(self): fix = RowFixture() unused = CollSymbol( [AnObject(1), AnObject(2), AnObject(3)], AnObject._typeDict) FitGlobal.testLevelSymbols = {} table = Parse( "<table><tr><td>fit.RowFixture</td><td>aCollection</td></tr>" "<tr><td>output</td></tr>" "<tr><td>1</td></tr>" "<tr><td>2</td></tr>" "<tr><td>3</td></tr></table>") fix.doTables(table) parmCell = table.parts.parts.more assert parmCell.tagIsError() assert table.parts.more.more.more.more.more is None
def shouldPostExceptionInParameterCellIfSymbolMissing(self): fix = RowFixture() unused = CollSymbol([AnObject(1), AnObject(2), AnObject(3)], AnObject._typeDict) FitGlobal.testLevelSymbols = {} table = Parse( "<table><tr><td>fit.RowFixture</td><td>aCollection</td></tr>" "<tr><td>output</td></tr>" "<tr><td>1</td></tr>" "<tr><td>2</td></tr>" "<tr><td>3</td></tr></table>") fix.doTables(table) parmCell = table.parts.parts.more assert parmCell.tagIsError() assert table.parts.more.more.more.more.more is None
def shouldHandleCollectionFromSymbol(self): fix = RowFixture() coll = CollSymbol( [AnObject(1), AnObject(2), AnObject(3)], AnObject._typeDict) fix.setSymbol("aCollection", coll) table = Parse( "<table><tr><td>fit.RowFixture</td><td>aCollection</td></tr>" "<tr><td>output</td></tr>" "<tr><td>1</td></tr>" "<tr><td>2</td></tr>" "<tr><td>3</td></tr></table>") fix.doTables(table) row1 = table.parts.more.more.parts row2 = table.parts.more.more.more.parts row3 = table.parts.more.more.more.more.parts assert row1.tagIsRight() assert row2.tagIsRight() assert row3.tagIsRight() assert table.parts.more.more.more.more.more is None
def shouldHandleCollectionFromSymbol(self): fix = RowFixture() coll = CollSymbol([AnObject(1), AnObject(2), AnObject(3)], AnObject._typeDict) fix.setSymbol("aCollection", coll) table = Parse( "<table><tr><td>fit.RowFixture</td><td>aCollection</td></tr>" "<tr><td>output</td></tr>" "<tr><td>1</td></tr>" "<tr><td>2</td></tr>" "<tr><td>3</td></tr></table>") fix.doTables(table) row1 = table.parts.more.more.parts row2 = table.parts.more.more.more.parts row3 = table.parts.more.more.more.more.parts assert row1.tagIsRight() assert row2.tagIsRight() assert row3.tagIsRight() assert table.parts.more.more.more.more.more is None