]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
amended test
authorRamonWill <ramonwilliams@hotmail.co.uk>
Fri, 10 Jul 2020 14:14:32 +0000 (15:14 +0100)
committerRamonWill <ramonwilliams@hotmail.co.uk>
Fri, 10 Jul 2020 14:14:32 +0000 (15:14 +0100)
test/orm/test_query.py

index 5beb75c1a48174aa43b5587afbed9bedc59a8f47..4416c51d0b47ebb354eb2399663d6c0269257ffe 100644 (file)
@@ -5822,6 +5822,8 @@ class ExecutionOptionsTest(QueryTest):
         q1.all()
 
     def test_options_before_compile(self):
+        User = self.classes.User
+
         @event.listens_for(Query, "before_compile", retval=True)
         def _before_compile(query):
             return query.execution_options(my_option=True)
@@ -5835,7 +5837,7 @@ class ExecutionOptionsTest(QueryTest):
             opts.update(context.execution_options)
 
         sess = create_session(bind=testing.db, autocommit=False)
-        sess.query(column("1")).all()
+        sess.query(User).first()
         eq_(opts["my_option"], True)