Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Nov 23, 2024
1 parent 40b2184 commit 7457c8b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/playground/test_playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@ def test_has_one_can_build_off_query_builder(self):
# Access the related company instance as a property
related_company = user.company
# self.assertEqual(related_company.company_name, "ROTHCO ACCOUNT")
self.assertEqual(user.company().to_sql(), "SELECT * FROM `tbl_companies` WHERE `tbl_companies`.`company_id` = '373849'")
self.assertEqual(user.company().to_sql(), "SELECT * FROM `tbl_companies` WHERE `tbl_companies`.`company_id` = '373849'")

def test_has_one_can_append_query_builder(self):
user = User.find(667)

# Access the related company instance as a property
related_company = user.company
# self.assertEqual(related_company.company_name, "ROTHCO ACCOUNT")
self.assertEqual(user.company().limit(1).to_sql(), "SELECT * FROM `tbl_companies` WHERE `tbl_companies`.`company_id` = '373849' LIMIT 1")

0 comments on commit 7457c8b

Please sign in to comment.