'Users are allowed to commit and rollback connections.'

def test_commit(self):

    connection.set_autocommit(False)
    try:
        self.assertIs(connection._dirty, False)
        list(Mod.objects.all())
        self.assertTrue(connection.is_dirty())
        connection.commit()
        self.assertFalse(connection.is_dirty())
        list(Mod.objects.all())
        self.assertTrue(connection.is_dirty())
        connection.rollback()
        self.assertFalse(connection.is_dirty())
    finally:
        connection.set_autocommit(True)
