ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #01850
[Merge] lp:~carla-sella/ubuntu-calendar-app/fix-dayview-default-view into lp:ubuntu-calendar-app
Carla Sella has proposed merging lp:~carla-sella/ubuntu-calendar-app/fix-dayview-default-view into lp:ubuntu-calendar-app with lp:~pkunal-parmar/ubuntu-calendar-app/WeekNumber as a prerequisite.
Commit message:
Fixing weed number issue in DayView test default view.
Requested reviews:
Nicholas Skaggs (nskaggs)
For more details, see:
https://code.launchpad.net/~carla-sella/ubuntu-calendar-app/fix-dayview-default-view/+merge/257814
Fixes Week number issue in DayView test default view.
--
Your team Ubuntu Calendar Developers is subscribed to branch lp:ubuntu-calendar-app.
=== modified file 'tests/autopilot/calendar_app/__init__.py'
--- tests/autopilot/calendar_app/__init__.py 2015-04-17 19:49:43 +0000
+++ tests/autopilot/calendar_app/__init__.py 2015-04-29 19:54:48 +0000
@@ -25,6 +25,7 @@
from autopilot import exceptions
from dateutil import tz
import math
+import locale
from testtools.matchers import GreaterThan
from calendar_app import data
=== modified file 'tests/autopilot/calendar_app/tests/test_dayview.py'
--- tests/autopilot/calendar_app/tests/test_dayview.py 2015-04-29 19:54:48 +0000
+++ tests/autopilot/calendar_app/tests/test_dayview.py 2015-04-29 19:54:48 +0000
@@ -75,8 +75,13 @@
self.assertEquals(
self.day_view.get_datelabel(today).text, str(now.day))
- week = int(now.strftime("%U"))+1
+ locale = self.app.main_view.get_locale_first_week_day()
+ if locale == ('it_IT', 'UTF-8'):
+ week = int(now.strftime("%W"))+1
+ elif locale == ('en_US', 'UTF-8'):
+ week = int(now.strftime("%U"))+1
+ logger.warn(locale)
logger.warn(now)
logger.warn(str(week))
logger.warn(self.day_view.get_weeknumer(today).text)
References