Skip to content

Commit

Permalink
Add one more testcase.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed May 18, 2023
1 parent 40f7225 commit 1f4c86a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ def test_star(self):
'FROM "tweets" AS "t1" '
'INNER JOIN "users" AS "t2" ON ("t1"."user_id" = "t2"."id")'), [])

query = (Tweet
.select(Tweet.star, User.c.id)
.join(User, on=(Tweet.c.user_id == User.c.id)))
self.assertSQL(query, (
'SELECT "t1".*, "t2"."id" '
'FROM "tweets" AS "t1" '
'INNER JOIN "users" AS "t2" ON ("t1"."user_id" = "t2"."id")'), [])

def test_from_clause(self):
query = (Note
.select(Note.content, Person.name)
Expand Down

0 comments on commit 1f4c86a

Please sign in to comment.