Skip to content

Instantly share code, notes, and snippets.

@viniciusao
Created June 24, 2022 16:27
Show Gist options
  • Save viniciusao/d023a9221f402ca2003818615074ea09 to your computer and use it in GitHub Desktop.
Save viniciusao/d023a9221f402ca2003818615074ea09 to your computer and use it in GitHub Desktop.
Pytest mock database: test same name
def test_same_name(session_same_name):
s, models = session_same_name
username = s.query(models['User'].__class__).first().name
actorname = s.query(models['Actor'].__class__).first().name
assert username == actorname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment