Skip to content

Commit

Permalink
test: errored gstin response
Browse files Browse the repository at this point in the history
  • Loading branch information
vorasmit committed Oct 18, 2024
1 parent b0e5ea0 commit ec66e93
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions india_compliance/gst_india/utils/test_gstin_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,20 @@ def test_tcs_gstin_info(self):
},
},
)

def test_invalid_gstin(self):
self.mock_public_api.return_value = Mock()
self.mock_public_api.return_value.get_gstin_info.return_value = frappe._dict(
{
"errorCode": "FO8000",
"gstin": "24AQTPC8950E1ZO",
"message": "No records found",
"status": 500,
"sts": "Invalid",
"success": False,
}
)

gstin_info = get_gstin_info("24AQTPC8950E1ZO")
self.assertEqual(gstin_info.status, "Invalid")
self.assertEqual(gstin_info.business_name, "")

0 comments on commit ec66e93

Please sign in to comment.