def test_whitespace_stripped_from_text_field(self):
        ticket = Ticket(self.env)
        ticket['keywords'] = 'kw1'
        ticket['milestone'] = 'milestone1'
        ticket.insert()

        ticket['keywords'] = '  kw1'
        ticket['milestone'] = 'milestone2'
        ticket.save_changes()
        changes = self.env.db_query("""
            SELECT oldvalue, newvalue FROM ticket_change
            """)

        self.assertEqual('kw1', ticket['keywords'])
        self.assertEqual('milestone2', ticket['milestone'])
        self.assertEqual(2, len(changes))
        self.assertIn(('milestone1', 'milestone2'), changes)
        self.assertIn(('1', None), changes)
Parse a time from a string.
dataset/ETHPy150Open edgewall/trac/trac/ticket/tests/model.py/TicketTestCase.test_whitespace_stripped_from_text_field--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Babel-0.9.6/babel/dates.py/parse_time