Merge lp:~elopio/reminders-app/fix_with_account into lp:reminders-app

Proposed by Leo Arias
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 189
Merged at revision: 168
Proposed branch: lp:~elopio/reminders-app/fix_with_account
Merge into: lp:reminders-app
Prerequisite: lp:~nskaggs/reminders-app/fix-new-pep8
Diff against target: 424 lines (+197/-81)
4 files modified
tests/autopilot/reminders/credentials.py (+56/-14)
tests/autopilot/reminders/tests/__init__.py (+67/-58)
tests/autopilot/reminders/tests/test_credentials.py (+70/-0)
tests/autopilot/reminders/tests/test_reminders.py (+4/-9)
To merge this branch: bzr merge lp:~elopio/reminders-app/fix_with_account
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
David Planella Approve
Nicholas Skaggs Pending
Review via email: mp+224539@code.launchpad.net

This proposal supersedes a proposal from 2014-06-23.

Commit message

Added logging messages and tests to the credentials autopilot tests helpers.

Description of the change

Added logging messages and tests to the credentials autopilot tests helpers.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote : Posted in a previous version of this proposal

This still fails on the desktop for me.. no account created :-(

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote : Posted in a previous version of this proposal

These greatly improves things, though still has some interesting behaviours that can be observed running the tests.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
188. By Leo Arias

Reverted manifest.json change.

189. By Leo Arias

Fixed comments.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

FAILED: Continuous integration, rev:189
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~elopio/reminders-app/fix_with_account/+merge/224539/+edit-commit-message

http://91.189.93.70:8080/job/reminders-app-ci/414/
Executed test runs:
    SUCCESS: http://91.189.93.70:8080/job/generic-mediumtests-utopic/652
        deb: http://91.189.93.70:8080/job/generic-mediumtests-utopic/652/artifact/work/output/*zip*/output.zip
    SUCCESS: http://91.189.93.70:8080/job/reminders-app-utopic-amd64-ci/109

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/reminders-app-ci/414/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Looks good to me and it passes tests, but I'd like to have some more context from either Leo or Nick before top-approving.

review: Approve
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

dpm, at the moment everything passes, but the credentials tests behave oddly. It seems the isolation isn't working well. In addition, on the phone we are unable to isolate properly. If we do so the app fails to launch currently.

Revision history for this message
David Planella (dpm) wrote :

I've tested this on the emulator, having installed both plugin packages built from this branch [1].

First I tested it with running the app, and then simply starting Ubuntu System Settings and trying to add a regular Evernote account. So if I go to System Settings and choose the Evernote account, it then shows me the login page. After entering my credentials, it seems to work (Evernote asks me if I want to re-authorize the app to access this account). However, after hitting the button to re-authorize, it then hangs forever like this: http://i.imgur.com/TZi6P4u.png

This is the full debug output [2] of Online Accounts, but the most interesting part are the last few lines:

qml: Account created!
EvernoteConnection not set up completely. You need to set a hostname and a token. Cannot execute job. ( FetchUsernameJob )
Error fetching username: "Token or hostname not set."

The "Account created!" debug message I simply added it to the plugin's Main.qml file, so it's not in this branch. In any case, it seems that fetching the user name does not work for some reason, and that's presumably causing UOA to hang.

[1] https://launchpad.net/~dpm/+archive/ppa/+packages?field.name_filter=&field.status_filter=&field.series_filter=utopic
[2] http://pastebin.ubuntu.com/7706895/

Revision history for this message
David Planella (dpm) wrote :

Ah well... please ignore the comment, I pasted it into the wrong browser tab and thus into the wrong MP... at least it was for the right app!

Sorry for the noise.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Landing this to keep things moving forward. The credentials weirdness will live on for now.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/reminders/credentials.py'
--- tests/autopilot/reminders/credentials.py 2014-06-25 23:31:11 +0000
+++ tests/autopilot/reminders/credentials.py 2014-06-25 23:31:11 +0000
@@ -14,12 +14,16 @@
14# You should have received a copy of the GNU General Public License14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
1717import logging
18import time
18import threading19import threading
1920
20from gi.repository import Accounts, GLib, Signon21from gi.repository import Accounts, GLib, Signon
2122
2223
24logger = logging.getLogger(__name__)
25
26
23class CredentialsException(Exception):27class CredentialsException(Exception):
2428
25 """Exception for credentials problems."""29 """Exception for credentials problems."""
@@ -52,6 +56,7 @@
52 :param oauth_token: The oauth token of the account.56 :param oauth_token: The oauth token of the account.
5357
54 """58 """
59 logger.debug('Add an evernote account.')
55 self._start_main_loop()60 self._start_main_loop()
5661
57 account = self._create_account()62 account = self._create_account()
@@ -65,11 +70,17 @@
6570
66 self._join_main_loop()71 self._join_main_loop()
6772
73 # XXX Sometimes, the account fails to be enabled. This sleep seems to
74 # fix it but we haven't yet found the reason. --elopio - 2014-06-25
75 time.sleep(10)
68 self._enable_evernote_service(account)76 self._enable_evernote_service(account)
6977
78 logger.info('Created the account with id: {}.'.format(account.id))
79 self._log_accounts_info()
70 return account80 return account
7181
72 def _create_account(self):82 def _create_account(self):
83 logger.debug('Creating the Evernote account.')
73 account = self._manager.create_account('evernote')84 account = self._manager.create_account('evernote')
74 account.set_enabled(True)85 account.set_enabled(True)
75 account.store(self._on_account_created, None)86 account.store(self._on_account_created, None)
@@ -77,8 +88,12 @@
7788
78 def _on_account_created(self, account, error, _):89 def _on_account_created(self, account, error, _):
79 if error:90 if error:
80 self.error = error91 self._quit_main_loop_on_error(error, 'storing account')
81 self._main_loop.quit()92
93 def _quit_main_loop_on_error(self, error, step):
94 logger.error('Error {}.'.format(step))
95 self.error = error
96 self._main_loop.quit()
8297
83 def _get_identity_info(self, user_name, password):98 def _get_identity_info(self, user_name, password):
84 info = Signon.IdentityInfo.new()99 info = Signon.IdentityInfo.new()
@@ -90,9 +105,10 @@
90 def _set_credentials_id_to_account(105 def _set_credentials_id_to_account(
91 self, identity, id_, error, account_dict):106 self, identity, id_, error, account_dict):
92 if error:107 if error:
93 self.error = error108 self._quit_main_loop_on_error(
94 self._main_loop.quit()109 error, 'storing credentials with info')
95110
111 logger.debug('Setting credentials to account.')
96 account = account_dict.get('account')112 account = account_dict.get('account')
97 oauth_token = account_dict.get('oauth_token')113 oauth_token = account_dict.get('oauth_token')
98 account.set_variant('CredentialsId', GLib.Variant('u', id_))114 account.set_variant('CredentialsId', GLib.Variant('u', id_))
@@ -100,9 +116,10 @@
100116
101 def _process_session(self, account, error, oauth_token):117 def _process_session(self, account, error, oauth_token):
102 if error:118 if error:
103 self.error = error119 self._quit_main_loop_on_error(
104 self._main_loop.quit()120 error, 'setting credentials id to account')
105121
122 logger.debug('Processing session.')
106 account_service = Accounts.AccountService.new(account, None)123 account_service = Accounts.AccountService.new(account, None)
107 auth_data = account_service.get_auth_data()124 auth_data = account_service.get_auth_data()
108 identity = auth_data.get_credentials_id()125 identity = auth_data.get_credentials_id()
@@ -119,15 +136,39 @@
119136
120 def _on_login_processed(self, session, reply, error, userdata):137 def _on_login_processed(self, session, reply, error, userdata):
121 if error:138 if error:
122 self.error = error139 self._quit_main_loop_on_error(error, 'processing session')
123140
124 self._main_loop.quit()141 else:
142 self._main_loop.quit()
125143
126 def _enable_evernote_service(self, account):144 def _enable_evernote_service(self, account):
145 logger.debug('Enabling evernote service.')
127 service = self._manager.get_service('evernote')146 service = self._manager.get_service('evernote')
128 account.select_service(service)147 account.select_service(service)
129 account.set_enabled(True)148 account.set_enabled(True)
130 account.store(self._on_account_created, None)149 account.store(self._on_service_enabled, None)
150
151 def _on_service_enabled(self, account, error, _):
152 if error:
153 self._quit_main_loop_on_error(error, 'enabling service')
154
155 def _log_accounts_info(self):
156 account_ids = self._manager.list()
157 logger.debug('Existing accounts: {}.'.format(account_ids))
158 for id_ in account_ids:
159 account = self._manager.get_account(id_)
160 self._log_account_info(account)
161
162 def _log_account_info(self, account):
163 logger.debug('Account info:')
164 logger.debug('id: {}'.format(account.id))
165 logger.debug('provider: {}'.format(account.get_provider_name()))
166 logger.debug('enabled: {}'.format(account.get_enabled()))
167 logger.debug('Account services:')
168 for service in account.list_services():
169 logger.debug('name: {}'.format(service.get_name()))
170 account_service = Accounts.AccountService.new(account, service)
171 logger.debug('enabled: {}'.format(account_service.get_enabled()))
131172
132 def delete_account(self, account):173 def delete_account(self, account):
133 """Delete an account.174 """Delete an account.
@@ -135,13 +176,14 @@
135 :param account: The account to delete.176 :param account: The account to delete.
136177
137 """178 """
179 logger.info('Deleting the account with id {}.'.format(account.id))
138 self._start_main_loop()180 self._start_main_loop()
139 account.delete()181 account.delete()
140 account.store(self._on_account_deleted, None)182 account.store(self._on_account_deleted, None)
141 self._join_main_loop()183 self._join_main_loop()
142184
143 def _on_account_deleted(self, account, error, userdata):185 def _on_account_deleted(self, account, error, _):
144 if error:186 if error:
145 self.error = error187 self._quit_main_loop_on_error(error, 'deleting account')
146188 else:
147 self._main_loop.quit()189 self._main_loop.quit()
148190
=== modified file 'tests/autopilot/reminders/tests/__init__.py'
--- tests/autopilot/reminders/tests/__init__.py 2014-06-25 23:31:11 +0000
+++ tests/autopilot/reminders/tests/__init__.py 2014-06-25 23:31:11 +0000
@@ -16,14 +16,13 @@
1616
17"""Reminders app autopilot tests."""17"""Reminders app autopilot tests."""
1818
19import logging
19import os20import os
20import shutil21import shutil
21import logging22import subprocess
2223
23import fixtures24import fixtures
24from autopilot import logging as autopilot_logging25from autopilot import logging as autopilot_logging
25from autopilot.input import Mouse, Touch, Pointer
26from autopilot.platform import model
27from autopilot.testcase import AutopilotTestCase26from autopilot.testcase import AutopilotTestCase
28from ubuntuuitoolkit import (27from ubuntuuitoolkit import (
29 emulators as toolkit_emulators,28 emulators as toolkit_emulators,
@@ -35,15 +34,13 @@
35logger = logging.getLogger(__name__)34logger = logging.getLogger(__name__)
3635
3736
38class RemindersAppTestCase(AutopilotTestCase):37class BaseTestCaseWithTempHome(AutopilotTestCase):
3938
40 """A common test case class that provides several useful methods for39 """Base test case that patches the home directory.
41 reminders-app tests."""40
4241 That way we start the tests with a clean environment.
43 if model() == 'Desktop':42
44 scenarios = [('with mouse', dict(input_device_class=Mouse))]43 """
45 else:
46 scenarios = [('with touch', dict(input_device_class=Touch))]
4744
48 local_location = os.path.dirname(os.path.dirname(os.getcwd()))45 local_location = os.path.dirname(os.path.dirname(os.getcwd()))
4946
@@ -53,7 +50,20 @@
53 installed_location_binary = '/usr/bin/reminders'50 installed_location_binary = '/usr/bin/reminders'
54 installed_location_qml = '/usr/share/reminders/qml/reminders.qml'51 installed_location_qml = '/usr/share/reminders/qml/reminders.qml'
5552
56 def get_launcher_and_type(self):53 def setUp(self):
54 self.kill_signond()
55 self.addCleanup(self.kill_signond)
56 super(BaseTestCaseWithTempHome, self).setUp()
57 _, test_type = self.get_launcher_method_and_type()
58 self.home_dir = self._patch_home(test_type)
59
60 def kill_signond(self):
61 # We kill signond so it's restarted using the temporary HOME. Otherwise
62 # it will remain running until it has 5 seconds of inactivity, keeping
63 # reference to other directories.
64 subprocess.call(['pkill', '-9', 'signond'])
65
66 def get_launcher_method_and_type(self):
57 if os.path.exists(self.local_location_binary):67 if os.path.exists(self.local_location_binary):
58 launcher = self.launch_test_local68 launcher = self.launch_test_local
59 test_type = 'local'69 test_type = 'local'
@@ -65,27 +75,34 @@
65 test_type = 'click'75 test_type = 'click'
66 return launcher, test_type76 return launcher, test_type
6777
68 def setUp(self):78 @autopilot_logging.log_action(logger.info)
69 launcher, test_type = self.get_launcher_and_type()79 def launch_test_local(self):
70 self.home_dir = self._patch_home(test_type)80 self.useFixture(fixtures.EnvironmentVariable(
71 self.pointing_device = Pointer(self.input_device_class.create())81 'QML2_IMPORT_PATH',
72 super(RemindersAppTestCase, self).setUp()82 newvalue=os.path.join(self.local_location, 'src/plugin')))
7383 return self.launch_test_application(
74 self.app = reminders.RemindersApp(launcher())84 self.local_location_binary,
7585 '-q', self.local_location_qml,
76 def _copy_xauthority_file(self, directory):86 app_type='qt',
77 """ Copy .Xauthority file to directory, if it exists in /home87 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
78 """88
79 xauth = os.path.expanduser(os.path.join('~', '.Xauthority'))89 @autopilot_logging.log_action(logger.info)
80 if os.path.isfile(xauth):90 def launch_test_installed(self):
81 logger.debug("Copying .Xauthority to " + directory)91 return self.launch_test_application(
82 shutil.copyfile(92 self.installed_location_binary,
83 os.path.expanduser(os.path.join('~', '.Xauthority')),93 '-q ' + self.installed_location_qml,
84 os.path.join(directory, '.Xauthority'))94 '--desktop_file_hint=/usr/share/applications/'
95 'reminders.desktop',
96 app_type='qt',
97 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
98
99 @autopilot_logging.log_action(logger.info)
100 def launch_test_click(self):
101 return self.launch_click_package(
102 'com.ubuntu.reminders',
103 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
85104
86 def _patch_home(self, test_type):105 def _patch_home(self, test_type):
87 """ mock /home for testing purposes to preserve user data
88 """
89 temp_dir_fixture = fixtures.TempDir()106 temp_dir_fixture = fixtures.TempDir()
90 self.useFixture(temp_dir_fixture)107 self.useFixture(temp_dir_fixture)
91 temp_dir = temp_dir_fixture.path108 temp_dir = temp_dir_fixture.path
@@ -114,29 +131,21 @@
114131
115 return temp_dir132 return temp_dir
116133
117 @autopilot_logging.log_action(logger.info)134 def _copy_xauthority_file(self, directory):
118 def launch_test_local(self):135 """Copy .Xauthority file to directory, if it exists in /home."""
119 self.useFixture(fixtures.EnvironmentVariable(136 xauth = os.path.expanduser(os.path.join('~', '.Xauthority'))
120 'QML2_IMPORT_PATH',137 if os.path.isfile(xauth):
121 newvalue=os.path.join(self.local_location, 'src/plugin')))138 logger.debug("Copying .Xauthority to " + directory)
122 return self.launch_test_application(139 shutil.copyfile(
123 self.local_location_binary,140 os.path.expanduser(os.path.join('~', '.Xauthority')),
124 '-q', self.local_location_qml,141 os.path.join(directory, '.Xauthority'))
125 app_type='qt',142
126 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)143
127144class RemindersAppTestCase(BaseTestCaseWithTempHome):
128 @autopilot_logging.log_action(logger.info)145
129 def launch_test_installed(self):146 """Base test case that launches the reminders-app."""
130 return self.launch_test_application(147
131 self.installed_location_binary,148 def setUp(self):
132 '-q ' + self.installed_location_qml,149 super(RemindersAppTestCase, self).setUp()
133 '--desktop_file_hint=/usr/share/applications/'150 launcher_method, _ = self.get_launcher_method_and_type()
134 'reminders.desktop',151 self.app = reminders.RemindersApp(launcher_method())
135 app_type='qt',
136 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
137
138 @autopilot_logging.log_action(logger.info)
139 def launch_test_click(self):
140 return self.launch_click_package(
141 'com.ubuntu.reminders',
142 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
143152
=== added file 'tests/autopilot/reminders/tests/test_credentials.py'
--- tests/autopilot/reminders/tests/test_credentials.py 1970-01-01 00:00:00 +0000
+++ tests/autopilot/reminders/tests/test_credentials.py 2014-06-25 23:31:11 +0000
@@ -0,0 +1,70 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17import logging
18
19from gi.repository import Accounts
20from testtools.matchers import HasLength
21
22from reminders import credentials, evernote, tests
23
24
25logger = logging.getLogger(__name__)
26
27
28class EvernoteCredentialsTestCase(tests.BaseTestCaseWithTempHome):
29
30 def setUp(self):
31 super(EvernoteCredentialsTestCase, self).setUp()
32 self.account_manager = credentials.AccountManager()
33
34 def add_evernote_account(self):
35 account = self.account_manager.add_evernote_account(
36 'dummy', 'dummy', evernote.TEST_OAUTH_TOKEN)
37 self.addCleanup(self.delete_account_and_manager, account)
38 return account
39
40 def delete_account_and_manager(self, account):
41 if account.id in self.account_manager._manager.list():
42 self.account_manager.delete_account(account)
43 del self.account_manager._manager
44 del self.account_manager
45
46 def test_add_evernote_account_must_enable_it(self):
47 account = self.add_evernote_account()
48
49 self.assertTrue(account.get_enabled())
50
51 def test_add_evernote_account_must_set_provider(self):
52 account = self.add_evernote_account()
53
54 self.assertEqual(account.get_provider_name(), 'evernote')
55
56 def test_add_evernote_account_must_enable_evernote_service(self):
57 account = self.add_evernote_account()
58 services = account.list_services()
59
60 self.assertThat(services, HasLength(1))
61 self.assertEqual(services[0].get_name(), 'evernote')
62 service = Accounts.AccountService.new(account, services[0])
63 self.assertTrue(service.get_enabled())
64
65 def test_delete_evernote_account_must_remove_it(self):
66 account = self.add_evernote_account()
67 self.assertThat(self.account_manager._manager.list(), HasLength(1))
68
69 self.account_manager.delete_account(account)
70 self.assertThat(self.account_manager._manager.list(), HasLength(0))
071
=== modified file 'tests/autopilot/reminders/tests/test_reminders.py'
--- tests/autopilot/reminders/tests/test_reminders.py 2014-06-25 23:31:11 +0000
+++ tests/autopilot/reminders/tests/test_reminders.py 2014-06-25 23:31:11 +0000
@@ -66,6 +66,7 @@
66 super(RemindersTestCaseWithAccount, self).setUp()66 super(RemindersTestCaseWithAccount, self).setUp()
67 no_account_dialog = self.app.main_view.no_account_dialog67 no_account_dialog = self.app.main_view.no_account_dialog
68 self.add_evernote_account()68 self.add_evernote_account()
69 logger.info('Waiting for the Evernote account to be created.')
69 no_account_dialog.wait_until_destroyed()70 no_account_dialog.wait_until_destroyed()
70 self.evernote_client = evernote.SandboxEvernoteClient()71 self.evernote_client = evernote.SandboxEvernoteClient()
7172
@@ -93,15 +94,9 @@
93 notebooks_page.add_notebook(test_notebook_title)94 notebooks_page.add_notebook(test_notebook_title)
9495
95 last_notebook = notebooks_page.get_notebooks()[-1]96 last_notebook = notebooks_page.get_notebooks()[-1]
96 # TODO there's a bug with the last updated value: http://pad.lv/131875197 self.assertEqual(
97 # so we can't check the full tuple. Uncomment this as soon as the bug98 last_notebook,
98 # is fixed. --elopio - 2014-05-1299 (test_notebook_title, 'Last edited today', 'Private', 0))
99 # self.assertEqual(
100 # last_notebook,
101 # (test_notebook_title, 'Last edited today', 'Private', 0))
102 self.assertEqual(last_notebook[0], test_notebook_title)
103 self.assertEqual(last_notebook[2], 'Private')
104 self.assertEqual(last_notebook[3], 0)
105100
106 def test_add_notebook_must_create_it_in_server(self):101 def test_add_notebook_must_create_it_in_server(self):
107 """Test that an added notebook will be created on the server."""102 """Test that an added notebook will be created on the server."""

Subscribers

People subscribed via source and target branches