diff options
Diffstat (limited to 'service/test/unit/config')
-rw-r--r-- | service/test/unit/config/test_leap.py | 22 | ||||
-rw-r--r-- | service/test/unit/config/test_register.py | 16 | ||||
-rw-r--r-- | service/test/unit/config/test_site.py | 16 |
3 files changed, 51 insertions, 3 deletions
diff --git a/service/test/unit/config/test_leap.py b/service/test/unit/config/test_leap.py index 7e073d26..5a68c53a 100644 --- a/service/test/unit/config/test_leap.py +++ b/service/test/unit/config/test_leap.py @@ -1,3 +1,19 @@ +# +# Copyright (c) 2015 ThoughtWorks, Inc. +# +# Pixelated is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pixelated is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Pixelated. If not, see <http://www.gnu.org/licenses/>. + from leap.soledad.common.errors import InvalidAuthTokenError from mock import MagicMock, patch, Mock from twisted.trial import unittest @@ -122,8 +138,8 @@ class TestUserBootstrap(unittest.TestCase): self.leap_session.mail_store = mail_store mock_create_leap_session.return_value = self.leap_session self._service_factory.has_session.return_value = False - some_language = 'en-US' + default_language = 'pt-BR' - self._user_bootstrap.setup(self.user_auth, self.password, '') + self._user_bootstrap.setup(self.user_auth, self.password) - mock_add_welcome_email.called_once_with(mail_store, some_language) + mock_add_welcome_email.assert_called_once_with(mail_store, default_language) diff --git a/service/test/unit/config/test_register.py b/service/test/unit/config/test_register.py index 1d7918c4..990668e0 100644 --- a/service/test/unit/config/test_register.py +++ b/service/test/unit/config/test_register.py @@ -1,3 +1,19 @@ +# +# Copyright (c) 2015 ThoughtWorks, Inc. +# +# Pixelated is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pixelated is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Pixelated. If not, see <http://www.gnu.org/licenses/>. + from twisted.trial import unittest from mock import patch, Mock diff --git a/service/test/unit/config/test_site.py b/service/test/unit/config/test_site.py index 63ac9f1a..896126ec 100644 --- a/service/test/unit/config/test_site.py +++ b/service/test/unit/config/test_site.py @@ -1,3 +1,19 @@ +# +# Copyright (c) 2015 ThoughtWorks, Inc. +# +# Pixelated is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pixelated is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Pixelated. If not, see <http://www.gnu.org/licenses/>. + from twisted.trial import unittest from mock import MagicMock from pixelated.config.site import PixelatedSite |