Exemple #1
0
    def test_create_and_update(self):
        version = Version(self.env)
        version.name = 'Test'
        version.insert()

        self.assertEqual([('Test', 0, None)], self.env.db_query(
            "SELECT name, time, description FROM version WHERE name='Test'"))

        # Use the same model object to update the version
        version.description = 'Some text'
        version.update()
        self.assertEqual([('Test', 0, 'Some text')], self.env.db_query(
            "SELECT name, time, description FROM version WHERE name='Test'"))
Exemple #2
0
 def test_exists(self):
     """
     http://trac.edgewall.org/ticket/4247
     """
     for v in Version.select(self.env):
         self.assertEqual(v.exists, True)