Ejemplo n.º 1
0
def credit_left(request):
    credit = skebby_credit_left()
    credit_dict = credit.skebby_response if not credit.skebby_error else {}
    return HttpResponse(json.dumps(credit_dict), mimetype="application/json")
Ejemplo n.º 2
0
 def test_credit_left(self):
     r = skebby_credit_left()
     credit = r.skebby_response
     self.assertEqual(True, 'credit_left' in credit)
     self.assertEqual(True, 'classic_sms' in credit)
     self.assertEqual(True, 'basic_sms' in credit)