class TestLatexContestConstructor(unittest.TestCase): def setUp(self): self.__test_dir = os.path.join(os.path.dirname(__file__), 'testdata') read_file_dir = os.path.join(self.__test_dir, "contest_template.tex") self.__test_object = LatexContestConstructor(read(read_file_dir)) def test_set_title(self): test_title = "Yet another contest" self.__test_object.set_title(test_title) self.assertEqual( self.__test_object. _LatexContestConstructor__attributes["#{tpl_name}"], test_title) def test_set_date(self): test_date = "13 июля, среда" self.__test_object.set_date(test_date) self.assertEqual( self.__test_object. _LatexContestConstructor__attributes["#{tpl_date}"], test_date) def test_set_location(self): test_location = "ЛКШ-2011.июль, Берендеевы Поляны" self.__test_object.set_location(test_location) self.assertEqual( self.__test_object. _LatexContestConstructor__attributes["#{tpl_location}"], test_location)
class TestLatexContestConstructor(unittest.TestCase): def setUp(self): self.__test_dir = os.path.join(os.path.dirname(__file__), 'testdata') read_file_dir = os.path.join(self.__test_dir, "contest_template.tex") self.__test_object = LatexContestConstructor(read(read_file_dir)) def test_set_title (self): test_title = "Yet another contest" self.__test_object.set_title(test_title) self.assertEqual(self.__test_object._LatexContestConstructor__attributes["#{tpl_name}"], test_title) def test_set_date (self): test_date = "13 июля, среда" self.__test_object.set_date(test_date) self.assertEqual(self.__test_object._LatexContestConstructor__attributes["#{tpl_date}"], test_date) def test_set_location (self): test_location = "ЛКШ-2011.июль, Берендеевы Поляны" self.__test_object.set_location(test_location) self.assertEqual(self.__test_object._LatexContestConstructor__attributes["#{tpl_location}"], test_location)
def setUp(self): self.__test_dir = os.path.join(os.path.dirname(__file__), 'testdata') read_file_dir = os.path.join(self.__test_dir, "contest_template.tex") self.__test_object = LatexContestConstructor(read(read_file_dir))
def setUp(self): self.__test_dir = os.path.join(os.path.dirname(__file__), 'testdata') read_file_dir = os.path.join(self.__test_dir, "contest_template.tex") self.__test_object = LatexContestConstructor(read(read_file_dir))