示例#1
0
 def test_failed_sql_alchemy_exception_integrity(self, mock_add):
     with self.assertRaises(Conflict):
         create(company)
示例#2
0
 def test_failed_sql_alchemy_exception(self, mock_add):
     with self.assertRaises(InternalServerError):
         create(company)
示例#3
0
 def test_success(self, mock_add, mock_commit):
     response = create(company)
     assert mock_add.called
     assert mock_commit.called
     assert company_validate.validate(response)