def test_03(self): config_file = '../board.cfg' config = ConfigParser.RawConfigParser() config.read(config_file) connection_file = config.get('DatabaseSection', 'database.file') controller_dao = ControllerDao(connection_file) ticket_board_dao = TicketBoardDao(controller_dao.get_dict_database()) m_result = ticket_board_dao.get_ticket('feature2') print m_result.__dict__ self.assertTrue(m_result is not None)
def test_07(self): config_file = '../board.cfg' config = ConfigParser.RawConfigParser() config.read(config_file) connection_file = config.get('DatabaseSection', 'database.file') controller_dao = ControllerDao(connection_file) try: ticket_board_dao = TicketBoardDao(controller_dao.get_dict_database()) row = ticket_board_dao.get_ticket('feature2') row.user_request = '*****@*****.**' controller_dao._session.commit() self.assertTrue(True) except RuntimeError as e: self.assertTrue(False, e.message)
def test_07(self): config_file = '../board.cfg' config = ConfigParser.RawConfigParser() config.read(config_file) connection_file = config.get('DatabaseSection', 'database.file') controller_dao = ControllerDao(connection_file) try: ticket_board_dao = TicketBoardDao( controller_dao.get_dict_database()) row = ticket_board_dao.get_ticket('feature2') row.user_request = '*****@*****.**' controller_dao._session.commit() self.assertTrue(True) except RuntimeError as e: self.assertTrue(False, e.message)
def get_ticket_board(self, id_ticket): ticket_board_dao = TicketBoardDao(self._controller_dao.get_dict_database()) row = ticket_board_dao.get_ticket(id_ticket) return row