~pkunal-parmar/ubuntu-calendar-app/ICalImport

« back to all changes in this revision

Viewing changes to tests/autopilot/calendar_app/tests/test_dayview.py

  • Committer: Tarmac
  • Author(s): Nicholas Skaggs, Alan Pope
  • Date: 2015-05-22 10:02:58 UTC
  • mfrom: (648.1.3 fix-illogical-tests)
  • Revision ID: tarmac-20150522100258-g2cs050059298f6i
fix tests and pep8 errors.

Approved by Alan Pope , Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        self.assertEquals(
76
76
            self.day_view.get_datelabel(today).text, str(now.day))
77
77
 
78
 
        # Qt locale will return 0 for Sunday as first day of week
79
 
        # and will return 1 for monday.
80
 
        first_day_of_week = self.day_view.get_timeline_header(today).\
81
 
            firstDayOfWeek
82
 
        if first_day_of_week == 1:
83
 
            week = int(now.strftime("%W"))+1
84
 
        elif first_day_of_week == 0:
85
 
            week = int(now.strftime("%U"))+1
86
 
 
87
 
        logger.warn(first_day_of_week)
88
 
        logger.warn(now)
89
 
        logger.warn(str(week))
90
 
        logger.warn(self.day_view.get_weeknumer(today).text)
91
 
        # Checking week number is  correct
92
 
        self.assertEquals(
93
 
            self.day_view.get_weeknumer(today).text, 'W' + str(week))
94
 
 
95
78
        # Check  day is scrolled to the current time
96
79
        self.assertEquals(self.day_view.get_scrollHour(), now.hour)
97
80