MCPcopy Index your code
hub / github.com/realpython/discover-flask / setUp

Method setUp

tests/base.py:14–19  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12 return app
13
14 def setUp(self):
15 db.create_all()
16 db.session.add(User("admin", "ad@min.com", "admin"))
17 db.session.add(
18 BlogPost("Test post", "This is a test. Only a test.", "admin"))
19 db.session.commit()
20
21 def tearDown(self):
22 db.session.remove()

Callers

nothing calls this directly

Calls 2

UserClass · 0.90
BlogPostClass · 0.90

Tested by

no test coverage detected