Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Final unregistered template

  • Loading branch information...
commit 606ae55c5077e2d23ac74a6816f4671ad13b28c8 1 parent 31e2764
@fgaudin authored
Showing with 16 additions and 5 deletions.
  1. +14 −4 autoentrepreneur/tests.py
  2. +2 −1  media/css/style.css
View
18 autoentrepreneur/tests.py
@@ -131,7 +131,6 @@ def testNextDateBeforeExpiration(self):
self.assertEquals(next_date, computed_next_date)
def testNextDateAfterExpiration(self):
- # do not run this test on February 29
user = User.objects.get(pk=1)
profile = user.get_profile()
Subscription.objects.create(owner=user,
@@ -139,11 +138,16 @@ def testNextDateAfterExpiration(self):
expiration_date=datetime.date.today() - datetime.timedelta(10),
transaction_id='XXX')
+ expiration_date = datetime.date.today()
+ try:
+ computed_next_date = datetime.date(expiration_date.year + 1, expiration_date.month, expiration_date.day)
+ except:
+ # case of February 29th
+ computed_next_date = datetime.date(expiration_date.year + 1, 3, 1)
next_date = profile.get_next_expiration_date()
- self.assertEquals(next_date, datetime.date.today() + datetime.timedelta(365))
+ self.assertEquals(next_date, computed_next_date)
def testNextDateWhenPaymentFails(self):
- # do not run this test on February 29
user = User.objects.get(pk=1)
profile = user.get_profile()
Subscription.objects.create(owner=user,
@@ -151,8 +155,14 @@ def testNextDateWhenPaymentFails(self):
expiration_date=datetime.date.today() + datetime.timedelta(365),
transaction_id='XXX')
+ expiration_date = datetime.date.today()
+ try:
+ computed_next_date = datetime.date(expiration_date.year + 1, expiration_date.month, expiration_date.day)
+ except:
+ # case of February 29th
+ computed_next_date = datetime.date(expiration_date.year + 1, 3, 1)
next_date = profile.get_next_expiration_date()
- self.assertEquals(next_date, datetime.date.today() + datetime.timedelta(365))
+ self.assertEquals(next_date, computed_next_date)
def testNextDateWhenPaymentFailsWithRunningSubscription(self):
user = User.objects.get(pk=1)
View
3  media/css/style.css
@@ -448,7 +448,8 @@ textarea {
}
#unregistered-header {
- margin:5px;
+ background-color:#EFEFFF;
+ padding:5px;
padding-bottom: 10px;
border-bottom: 1px solid #CCCCCC;
}
Please sign in to comment.
Something went wrong with that request. Please try again.