diff options
40 files changed, 629 insertions, 52 deletions
@@ -1,81 +1,55 @@ VIRTUALENV=~/.venvs/pixua -.PHONY: setup +.PHONY: setup requirements install requirements_py install_py requirements_js install_js create_virtualenv +.PHONY: test test_py test_js test_all linters linters_py linters_js coverage unit_tests_py unit_tests_js +.PHONY: integration_tests_py functional_tests ensure_phantomjs_installed ensure_virtualenv_installed clean +.PHONY: clean_all clean_py clean_js clean_cache remove_virtualenv remove_javascript_packages setup: install -.PHONY: requirements requirements: requirements_py requirements_js - @echo "Installed requirements" -.PHONY: install install: requirements install_py install_js - @echo "Installed dependencies" -.PHONY: requirements_py requirements_py: create_virtualenv - @echo "Upgrading pip and setuptools" @. $(VIRTUALENV)/bin/activate;\ pip install --upgrade pip setuptools -.PHONY: install_py install_py: service/requirements.txt service/test_requirements.txt - @echo "Installing python packages" @. $(VIRTUALENV)/bin/activate;\ cd service;\ pip install pysqlcipher --upgrade --force-reinstall --install-option="--bundled";\ pip install --exists-action s -r requirements.txt -r test_requirements.txt -.PHONY: requirements_js requirements_js: - @echo "Installing javascript npm and bower dependencies" @cd web-ui;\ npm install;\ node_modules/.bin/bower install -.PHONY: install_js install_js: - @echo "Building front-end and static files" @cd web-ui;\ npm run build -.PHONY: create_virtualenv create_virtualenv: ensure_virtualenv_installed @if [ ! -e $(VIRTUALENV)/bin/activate ]; then\ echo "Pixelated virtualenv doesn't exist, creating now";\ virtualenv --python=python2 $(VIRTUALENV);\ - else\ - echo "Pixelated virtualenv already exists, moving on";\ fi -.PHONY: test test: test_py test_js coverage - -.PHONY: test_py test_py: clean requirements install coverage linters_py unit_tests_py integration_tests_py - -.PHONY: test_js test_js: clean requirements_js install_js linters_js unit_tests_js - -.PHONY: test_all test_all: test functional_tests - -.PHONY: linters linters: clean requirements install linters_py linters_js -.PHONY: linters_py linters_py: - @echo "Running pep8" @. $(VIRTUALENV)/bin/activate;\ cd service;\ pep8 --ignore=E501 pixelated test -.PHONY: linters_js linters_js: - @echo "Running jshint" @cd web-ui;\ npm run jshint -.PHONY: coverage coverage: @. $(VIRTUALENV)/bin/activate;\ cd service;\ @@ -84,80 +58,58 @@ coverage: coverage combine;\ coverage html -.PHONY: unit_tests_py unit_tests_py: - @echo "Running python unit tests" @. $(VIRTUALENV)/bin/activate;\ cd service;\ trial --reporter=text test.unit -.PHONY: unit_tests_js unit_tests_js: - @echo "Running javascript unit tests" @cd web-ui;\ npm run test -.PHONY: integration_tests_py integration_tests: - @echo "Running integration tests" @. $(VIRTUALENV)/bin/activate;\ cd service;\ trial -j`grep -c "^processor" /proc/cpuinfo || sysctl -n hw.logicalcpu` --reporter=text test.integration -.PHONY: functional_tests functional_tests: clean requirements install ensure_phantomjs_installed - @echo "Running behave functional tests" @. $(VIRTUALENV)/bin/activate;\ cd service;\ behave --tags ~@wip --tags ~@smoke test/functional/features -.PHONY: ensure_phantomjs_installed ensure_phantomjs_installed: @if [ ! `which phantomjs` ]; then\ echo "You need phantomJS to run these tests";\ exit 1;\ fi -.PHONY: ensure_virtualenv_installed ensure_virtualenv_installed: @if [ ! `which virtualenv` ]; then\ echo "Virtualenv must be installed";\ exit 1;\ - else\ - echo "Virtualenv located at "`which virtualenv`;\ fi -.PHONY: clean clean: clean_py clean_js clean_cache - @echo "Cleaning temporary files and the caches" - -.PHONY: clean_all clean_all: clean remove_javascript_packages remove_virtualenv - @echo "Cleaning temporary files, the caches and the virtualenv" -.PHONY: clean_py clean_py: rm -rf service/_trial_temp find . -name "*.pyc" -delete rm -rf service/.coverage rm -rf service/htmlcov -.PHONY: clean_js clean_js: rm -rf web-ui/dist rm -rf web-ui/.sass-cache -.PHONY: clean_cache clean_cache: rm -rf ~/.config/leap rm -rf ~/.leap rm -rf service/ghostdriver.log -.PHONY: remove_virtualenv remove_virtualenv: rm -rf $(VIRTUALENV) -.PHONY: remove_javascript_packages remove_javascript_packages: rm -rf web-ui/node_modules rm -rf web-ui/app/bower_components diff --git a/service/pixelated/adapter/mailstore/leap_attachment_store.py b/service/pixelated/adapter/mailstore/leap_attachment_store.py index c95b776a..b297f9e6 100644 --- a/service/pixelated/adapter/mailstore/leap_attachment_store.py +++ b/service/pixelated/adapter/mailstore/leap_attachment_store.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/>. + import quopri import base64 diff --git a/service/pixelated/adapter/services/feedback_service.py b/service/pixelated/adapter/services/feedback_service.py index 5200a9ff..0cc595eb 100644 --- a/service/pixelated/adapter/services/feedback_service.py +++ b/service/pixelated/adapter/services/feedback_service.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/>. + import os import requests diff --git a/service/pixelated/config/leap.py b/service/pixelated/config/leap.py index 4832b6d2..6b9ebf28 100644 --- a/service/pixelated/config/leap.py +++ b/service/pixelated/config/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 __future__ import absolute_import from leap.common.events import (server as events_server) diff --git a/service/pixelated/config/services.py b/service/pixelated/config/services.py index 9e4de84e..48c1a528 100644 --- a/service/pixelated/config/services.py +++ b/service/pixelated/config/services.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/>. + import os from twisted.internet import defer, reactor diff --git a/service/pixelated/config/sessions.py b/service/pixelated/config/sessions.py index b301132a..eba55100 100644 --- a/service/pixelated/config/sessions.py +++ b/service/pixelated/config/sessions.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 __future__ import absolute_import import os diff --git a/service/pixelated/config/site.py b/service/pixelated/config/site.py index 7163b52b..96554584 100644 --- a/service/pixelated/config/site.py +++ b/service/pixelated/config/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.web.server import Site, Request diff --git a/service/pixelated/resources/keys_resource.py b/service/pixelated/resources/keys_resource.py index e3d0733e..091c27d0 100644 --- a/service/pixelated/resources/keys_resource.py +++ b/service/pixelated/resources/keys_resource.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 email.utils import parseaddr from pixelated.resources import respond_json_deferred, BaseResource from twisted.web import server diff --git a/service/pixelated/resources/mail_resource.py b/service/pixelated/resources/mail_resource.py index 58bc7756..e1ba6087 100644 --- a/service/pixelated/resources/mail_resource.py +++ b/service/pixelated/resources/mail_resource.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/>. + import json from twisted.python.log import err diff --git a/service/pixelated/resources/mails_resource.py b/service/pixelated/resources/mails_resource.py index 93070dd6..d911e0d2 100644 --- a/service/pixelated/resources/mails_resource.py +++ b/service/pixelated/resources/mails_resource.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/>. + import time import json diff --git a/service/pixelated/support/clock.py b/service/pixelated/support/clock.py index f47c20c6..9cab8857 100644 --- a/service/pixelated/support/clock.py +++ b/service/pixelated/support/clock.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 datetime import datetime from os.path import expanduser diff --git a/service/pixelated/support/loglinegenerator.py b/service/pixelated/support/loglinegenerator.py index 3b7820fb..d8a8fd5b 100644 --- a/service/pixelated/support/loglinegenerator.py +++ b/service/pixelated/support/loglinegenerator.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 zope.interface import Interface diff --git a/service/pixelated/support/replier.py b/service/pixelated/support/replier.py index 0bcb1a27..bab23179 100644 --- a/service/pixelated/support/replier.py +++ b/service/pixelated/support/replier.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 email.utils import parseaddr diff --git a/service/test/integration/test_feedback_service.py b/service/test/integration/test_feedback_service.py index ff659396..da901b36 100644 --- a/service/test/integration/test_feedback_service.py +++ b/service/test/integration/test_feedback_service.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 httmock import urlmatch, HTTMock from mockito import when diff --git a/service/test/load/attachment_load.sh b/service/test/load/attachment_load.sh index 740dd846..5dce71b3 100644 --- a/service/test/load/attachment_load.sh +++ b/service/test/load/attachment_load.sh @@ -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/>. + #!/usr/bin/env bash number=$1 diff --git a/service/test/reactor/concurrent_logins.rb b/service/test/reactor/concurrent_logins.rb index f256599f..679aefd0 100644 --- a/service/test/reactor/concurrent_logins.rb +++ b/service/test/reactor/concurrent_logins.rb @@ -1,3 +1,20 @@ +# +# 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/>. + + # We use this script to simulate the login of multiple concurrent users, with # one login per second. # diff --git a/service/test/reactor/concurrent_logins.sh b/service/test/reactor/concurrent_logins.sh index e42b7c44..9de9eba8 100755 --- a/service/test/reactor/concurrent_logins.sh +++ b/service/test/reactor/concurrent_logins.sh @@ -1,4 +1,20 @@ #!/bin/bash +# +# 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/>. + USER_PREFIX="loadtest" PASSWORD_PREFIX="password_" diff --git a/service/test/reactor/create_users.py b/service/test/reactor/create_users.py index 18dc9dcf..c519e108 100755 --- a/service/test/reactor/create_users.py +++ b/service/test/reactor/create_users.py @@ -1,4 +1,20 @@ #!/usr/bin/env python +# +# 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/>. + # This script is used to mass register users # ATTENTION: this script does not log # the user in, so key creation will only diff --git a/service/test/reactor/send_emails_batch.sh b/service/test/reactor/send_emails_batch.sh index 80c28279..0df45177 100755 --- a/service/test/reactor/send_emails_batch.sh +++ b/service/test/reactor/send_emails_batch.sh @@ -1,4 +1,20 @@ #!/bin/bash +# +# 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/>. + for user in `seq $1`; do echo "Sending $2 mails for user loadtest$user" for email in `seq $2`; do diff --git a/service/test/unit/adapter/test_draft_service.py b/service/test/unit/adapter/test_draft_service.py index e18589eb..659b3517 100644 --- a/service/test/unit/adapter/test_draft_service.py +++ b/service/test/unit/adapter/test_draft_service.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 twisted.internet import defer from pixelated.adapter.mailstore.leap_mailstore import LeapMail diff --git a/service/test/unit/bitmask_libraries/test_certs.py b/service/test/unit/bitmask_libraries/test_certs.py index 300830be..6860aa70 100644 --- a/service/test/unit/bitmask_libraries/test_certs.py +++ b/service/test/unit/bitmask_libraries/test_certs.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 pixelated.bitmask_libraries.certs import LeapCertificate diff --git a/service/test/unit/config/test_leap.py b/service/test/unit/config/test_leap.py index c28faa32..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 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 diff --git a/service/test/unit/resources/__init__.py b/service/test/unit/resources/__init__.py index 5abd502b..8b72e39b 100644 --- a/service/test/unit/resources/__init__.py +++ b/service/test/unit/resources/__init__.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.internet.defer import succeed from twisted.web import server from twisted.web.server import Site diff --git a/service/test/unit/resources/test_archive_resource.py b/service/test/unit/resources/test_archive_resource.py index 1876f897..7e8b4656 100644 --- a/service/test/unit/resources/test_archive_resource.py +++ b/service/test/unit/resources/test_archive_resource.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 import json from mockito import mock, when, verify diff --git a/service/test/unit/resources/test_attachments_resource.py b/service/test/unit/resources/test_attachments_resource.py index 15f38406..5d68cb7d 100644 --- a/service/test/unit/resources/test_attachments_resource.py +++ b/service/test/unit/resources/test_attachments_resource.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/>. + import json from twisted.trial import unittest diff --git a/service/test/unit/resources/test_feedback_resource.py b/service/test/unit/resources/test_feedback_resource.py index 56433f56..b9ada5d5 100644 --- a/service/test/unit/resources/test_feedback_resource.py +++ b/service/test/unit/resources/test_feedback_resource.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/>. + import json from mockito import verify, mock, when, any as ANY from twisted.trial import unittest diff --git a/service/test/unit/resources/test_helpers.py b/service/test/unit/resources/test_helpers.py index 25a52da2..e21c5373 100644 --- a/service/test/unit/resources/test_helpers.py +++ b/service/test/unit/resources/test_helpers.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 import re diff --git a/service/test/unit/resources/test_keys_resources.py b/service/test/unit/resources/test_keys_resources.py index 17297206..5869e6be 100644 --- a/service/test/unit/resources/test_keys_resources.py +++ b/service/test/unit/resources/test_keys_resources.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/>. + import json import ast from mockito import mock, when, any as ANY diff --git a/service/test/unit/resources/test_login_resource.py b/service/test/unit/resources/test_login_resource.py index 45036f8d..cec57123 100644 --- a/service/test/unit/resources/test_login_resource.py +++ b/service/test/unit/resources/test_login_resource.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/>. + import os from mock import patch diff --git a/service/test/unit/resources/test_logout_resources.py b/service/test/unit/resources/test_logout_resources.py index 33c8537f..6d5fe33a 100644 --- a/service/test/unit/resources/test_logout_resources.py +++ b/service/test/unit/resources/test_logout_resources.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 mock import patch, MagicMock from twisted.internet import defer from twisted.trial import unittest diff --git a/service/test/unit/resources/test_root_resource.py b/service/test/unit/resources/test_root_resource.py index 5b1ed081..47a417fb 100644 --- a/service/test/unit/resources/test_root_resource.py +++ b/service/test/unit/resources/test_root_resource.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 import re diff --git a/service/test/unit/resources/test_sandbox_resource.py b/service/test/unit/resources/test_sandbox_resource.py index 4f263af1..8cf66670 100644 --- a/service/test/unit/resources/test_sandbox_resource.py +++ b/service/test/unit/resources/test_sandbox_resource.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/>. + import os from twisted.trial import unittest diff --git a/service/test/unit/resources/test_tags_resource.py b/service/test/unit/resources/test_tags_resource.py index a05da7a7..8ea6e75c 100644 --- a/service/test/unit/resources/test_tags_resource.py +++ b/service/test/unit/resources/test_tags_resource.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 mock import MagicMock from twisted.trial import unittest from twisted.web.test.requesthelper import DummyRequest diff --git a/service/test/unit/resources/test_user_settings_resource.py b/service/test/unit/resources/test_user_settings_resource.py index e9748e72..4ad7938d 100644 --- a/service/test/unit/resources/test_user_settings_resource.py +++ b/service/test/unit/resources/test_user_settings_resource.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 import json import ast diff --git a/service/test/unit/resources/test_users_resource.py b/service/test/unit/resources/test_users_resource.py index 4ca578ae..5bbe720a 100644 --- a/service/test/unit/resources/test_users_resource.py +++ b/service/test/unit/resources/test_users_resource.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 mockito import mock, when, verify from twisted.trial import unittest from twisted.web.test.requesthelper import DummyRequest diff --git a/service/test/unit/support/test_replier.py b/service/test/unit/support/test_replier.py index ef9b321c..7bc005a1 100644 --- a/service/test/unit/support/test_replier.py +++ b/service/test/unit/support/test_replier.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 pixelated.support import replier diff --git a/service/test/unit/test_application.py b/service/test/unit/test_application.py index 67c044c2..178bab22 100644 --- a/service/test/unit/test_application.py +++ b/service/test/unit/test_application.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 leap.common.events import catalog as events diff --git a/service/test/unit/test_authentication.py b/service/test/unit/test_authentication.py index 3e1b4a10..8ef1bce8 100644 --- a/service/test/unit/test_authentication.py +++ b/service/test/unit/test_authentication.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.cred.error import UnauthorizedLogin from twisted.internet.defer import inlineCallbacks from twisted.trial import unittest |