Display validity date
This commit is contained in:
parent
87f8b74ab1
commit
124e72aeb8
1 changed files with 7 additions and 6 deletions
|
|
@ -36,14 +36,15 @@ class HomePage(BasePage):
|
|||
credit = divabo.xpath('dl/dd')[1].text
|
||||
expiredate = divabo.xpath('dl/dd')[2].text
|
||||
phoneplan = divabo.xpath('dl/dd')[3].text
|
||||
self.browser.logger.debug('Found ' + owner + ' has subscriber')
|
||||
self.browser.logger.debug('Found ' + phone + ' has phone number')
|
||||
self.browser.logger.debug('Found ' + credit + ' has available credit')
|
||||
self.browser.logger.debug('Found ' + expiredate + 'has expire date ')
|
||||
self.browser.logger.debug('Found ' + phoneplan + ' has subscription type')
|
||||
self.browser.logger.debug('Found ' + owner + ' as subscriber')
|
||||
self.browser.logger.debug('Found ' + phone + ' as phone number')
|
||||
self.browser.logger.debug('Found ' + credit + ' as available credit')
|
||||
self.browser.logger.debug('Found ' + expiredate + ' as expire date ')
|
||||
self.browser.logger.debug('Found %s as subscription type', phoneplan)
|
||||
|
||||
subscription = Subscription(phone)
|
||||
subscription.label = unicode(phone + u' - ' + credit + u' - ' + phoneplan)
|
||||
subscription.label = unicode(u'%s - %s - %s - %s' %
|
||||
(phone, credit, phoneplan, expiredate))
|
||||
subscription.subscriber = unicode(owner)
|
||||
expiredate = date(*reversed([int(x) for x in expiredate.split(".")]))
|
||||
subscription.validity = expiredate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue