コード例 #1
0
ファイル: test_forms.py プロジェクト: umeshksingla/warehouse
 def test_form_accepts_db(self):
     db = pretend.stub()
     form = DBForm(db=db)
     assert form.db is db
コード例 #2
0
ファイル: test_forms.py プロジェクト: umeshksingla/warehouse
 def test_form_requires_db(self):
     with pytest.raises(TypeError):
         DBForm()