예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    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)
예제 #5
0
 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