getting tests to pass
This commit is contained in:
@@ -557,6 +557,7 @@ class gatewayresult(): # pragma: no cover
|
||||
self.transaction = vtransaction()
|
||||
self.payment_method = vpayment_method()
|
||||
self.subscription = vsubscription()
|
||||
self.paid_through_date = datetime.datetime.now()+datetime.timedelta(days=365)
|
||||
self.customer = kwargs.pop('customer',customer())
|
||||
|
||||
def __unicode__():
|
||||
@@ -615,6 +616,7 @@ class transaction(): # pragma: no cover
|
||||
'id': 12
|
||||
}
|
||||
self.created_at = datetime.datetime.now()
|
||||
self.paid_through_date = datetime.datetime.now()+datetime.timedelta(days=365)
|
||||
self.currency_iso_code = 'EUR'
|
||||
|
||||
class vtransaction(): # pragma: no cover
|
||||
@@ -627,6 +629,7 @@ class vtransaction(): # pragma: no cover
|
||||
'id': 12
|
||||
}
|
||||
self.created_at = datetime.datetime.now()
|
||||
self.paid_through_date = datetime.datetime.now()+datetime.timedelta(days=365)
|
||||
self.currency_iso_code = 'EUR'
|
||||
|
||||
class vsubscription(): # pragma: no cover
|
||||
@@ -636,9 +639,13 @@ class vsubscription(): # pragma: no cover
|
||||
def cancel(*args, **kwargs):
|
||||
return gatewayresult(is_success=True)
|
||||
|
||||
def find(*args, **kwargs):
|
||||
return subscription()
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.id = '121'
|
||||
self.billing_period_end_date = (datetime.datetime.now()+datetime.timedelta(days=365)).date()
|
||||
self.paid_through_date = (datetime.datetime.now()+datetime.timedelta(days=365)).date()
|
||||
self.status = 'Active'
|
||||
self.plan_id = 12
|
||||
self.price = 15
|
||||
@@ -654,9 +661,13 @@ class subscription(): # pragma: no cover
|
||||
def cancel(*args, **kwargs):
|
||||
return gatewayresult(is_success=True)
|
||||
|
||||
def find(*args, **kwargs):
|
||||
return subscription()
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.id = '121'
|
||||
self.billing_period_end_date = (datetime.datetime.now()+datetime.timedelta(days=365)).date()
|
||||
self.paid_through_date = (datetime.datetime.now()+datetime.timedelta(days=365)).date()
|
||||
self.transactions = [vtransaction()]
|
||||
self.status = 'Active'
|
||||
self.plan_id = 12
|
||||
|
||||
Reference in New Issue
Block a user