Exemplo n.º 1
0
 def test_failed_sql_alchemy_exception_integrity(self, mock_add):
     with self.assertRaises(Conflict):
         create(company)
Exemplo n.º 2
0
 def test_failed_sql_alchemy_exception(self, mock_add):
     with self.assertRaises(InternalServerError):
         create(company)
Exemplo n.º 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)