Commit Graph
6674 Commits
Author SHA1 Message Date
James Valleroy 0213fe370b bepasty: Convert functional tests to non-BDD python format
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Avoid global variable]
[sunil: Make a method local]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-26 13:47:48 -07:00
Sunil Mohan Adapa a0d880b62c sso: Update usage of OpenSSL crypt signing API
Avoid the deprecation warning:

DeprecationWarning: str for data is no longer accepted, use bytes
    sig = crypto.sign(pkey, data, 'sha512')

Tests:

- Login to web interface, access Syncthing web interface. The login should work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-26 12:29:45 -04:00
Sunil Mohan Adapa 07e62a213b views: Update utility for checking URL safety
Django has updated the is_safe_url() method that we based our implementation on.
It is now called url_has_allowed_host_and_scheme(). Our implementation remains
simple as we don't allow any hostname or scheme to be set.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-26 11:25:07 -04:00
Johannes Keyser 53539c7454 Translated using Weblate (German)
Currently translated at 100.0% (1514 of 1514 strings)
2021-09-26 08:35:30 +02:00
Sunil Mohan Adapa 351ba99c12 mediawiki: tests: Use common fixtures for testing actions module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:41:01 +03:00
Sunil Mohan Adapa 757d24c2be ejabberd: tests: Use common fixtures for testing actions module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:41:00 +03:00
Sunil Mohan Adapa cf32de2839 matrixsynapse: tests: Use common fixtures for testing actions module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:41:00 +03:00
Sunil Mohan Adapa 1ec16a7d58 openvpn: tests: Use common fixtures for testing actions module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:41:00 +03:00
Sunil Mohan Adapa 344915d84e gitweb: tests: Use common fixtures for testing actions module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:41:00 +03:00
Sunil Mohan Adapa 3526099c03 sso: tests: Use common fixtures for testing actions module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:41:00 +03:00
Sunil Mohan Adapa c28d3eea2f calibre: tests: Use common fixtures for testing actions module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:40:59 +03:00
Sunil Mohan Adapa 320729413d tests: Introduce fixtures to make it easy to test actions
- Derived from the often repeated fixture code in various test_actions.py files.

- Don't use the deprecated imp module. Instead use importlib. imp module will be
removed in future versions of Python.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-25 12:40:59 +03:00
Sunil Mohan Adapa b32d0f17f0 *: Use allow/denylist instead white/blacklist in comments
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2021-09-25 07:44:15 +05:30
Sunil Mohan Adapa 05565b1c60 settings: Set Django auto field type explicitly
This is already the default (Django 3.2), however, setting it explicitly seems
to avoid a warning while running 'django-admin makemigrations'.

Tests:

- Add SECRET_KEY to settings.py temporarily. Run the command 'django-admin
makemigrations --pythonpath=. --settings=plinth.settings'. There should no
warnings related DEFAULT_AUTO_FIELD not being set.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-22 21:52:30 -04:00
Sunil Mohan Adapa 613d3a856f signals: Drop provider args when creating Signal object
- Convert the information into code comments.

- This argument seems to be unused. Passing the argument has been deprecated. On
Django 3.2 it throws a warning that it will be removed from Django 4.0.

Tests:

- Run unit tests on Django 3.2 and Django 2.2. With Django 3.2, warning related
to provider_args are no longer show.

- On Django 3.2 and Django 2.2, change the hostname to trigger a signal.

Tests:

- Install ebabberd. Goto system -> config and change the hostname and domain
name. This triggers pre_hostname_change, post_hostname_change, domain_removed
and domain_added signals. There should be no errors during the process. Console
shows no errors.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-22 21:52:20 -04:00
Andrij Mizyk c330d7d530 Translated using Weblate (Ukrainian)
Currently translated at 78.5% (1189 of 1514 strings)
2021-09-21 22:38:16 +02:00
Michael Breidenbach 676729acbb Translated using Weblate (Swedish)
Currently translated at 100.0% (1514 of 1514 strings)
2021-09-21 22:38:15 +02:00
Burak Yavuz e7105afcb6 Translated using Weblate (Turkish)
Currently translated at 100.0% (1514 of 1514 strings)
2021-09-21 22:38:15 +02:00
Dietmar cf6099cfb9 Translated using Weblate (Italian)
Currently translated at 53.0% (803 of 1514 strings)
2021-09-21 22:38:14 +02:00
Dietmar 05d62c2354 Translated using Weblate (German)
Currently translated at 99.5% (1507 of 1514 strings)
2021-09-21 22:38:14 +02:00
Sunil Mohan Adapa cd2b2f5f2c *: Use django.urls.re_path() instead of its alias url()
- In Django 2.2 django.conf.urls.url() is an alias to django.urls.re_path().

- In Django 4.0, url() function will be removed. On Django 3.2, it throws a
warning that this function will be removed in future.

Tests:

- Run unit tests with Django 3.2 and Django 2.2.

- With Django 3.2 there are no warnings when running unit tests and when running
FreedomBox Service.

- Visit a few affected apps with both Django versions.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-20 16:50:47 -04:00
Sunil Mohan Adapa a3e21adc8b *: Various isort fixes
- Done automatically by running isort . in top level directory.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-20 16:50:37 -04:00
Sunil Mohan Adapa dcb69b447b pyproject: Make isort consistent across execution environments
In some cases, isort is not treating "plinth" module as a "first party" module.
It is then treated as a "third party" module and groups with non-standard python
libraries that we use. This behavior seems to dependent on from where isort is
run.

To eliminate this uncertainty, explicitly mark "plinth" module without depending
on automatic detection of isort. The two preferred ways to provide the
configuration are using .isort.cfg and pyproject.toml. The former introduces yet
another file in the project directory while the latter, a new python PEP,
promises to unify several other such configuration files.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-20 16:50:27 -04:00
Sunil Mohan Adapa 74214c18ae *: Use Django gettext functions instead of ugettext
- ugettext functions will be removed in Django 4.0. Each use emits a warning
when running with Django 3.2. Since we have warnings enabled in developer mode,
we see quite a few messages because of this.

- ugettext is already a simple alias of gettext. So, no regressions are
expected.

Tests:

- Accessing an affected app in UI with Django 3.2 and Django 2.2 works fine.

- Using Django 3.2 there are no warnings related to removal of ugettext
functions.

- Ran regular unit tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-20 16:50:16 -04:00
Andrij Mizyk 9ebbc34f1e Translated using Weblate (Ukrainian)
Currently translated at 75.4% (1143 of 1514 strings)
2021-09-19 21:42:21 +02:00
Andrij Mizyk 99383d8b48 Translated using Weblate (Ukrainian)
Currently translated at 75.4% (1143 of 1514 strings)
2021-09-19 21:07:03 +02:00
Andrij Mizyk c5793cfc3b Translated using Weblate (Ukrainian)
Currently translated at 75.4% (1143 of 1514 strings)
2021-09-19 17:05:07 +02:00
Sunil Mohan Adapa ffe34d013a tests: functional: Use newer splinter API for finding links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:48:16 +03:00
Sunil Mohan Adapa 2abe7315f9 calibre: tests: functional: Use newer splinter API for finding links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:48:11 +03:00
Sunil Mohan Adapa e6b1fe6783 dynamicdns: tests: functional: Use newer splinter API for finding links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:48:05 +03:00
Sunil Mohan Adapa 9811ce1b79 mediawiki: tests: functional: Use newer splinter API for finding links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:48:00 +03:00
Sunil Mohan Adapa 104cbc0b0d users: tests: functional: Use newer splinter API for finding links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:47:55 +03:00
Sunil Mohan Adapa 978fdec9eb backups: tests: functional: Use newer splinter API for finding links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:47:44 +03:00
Sunil Mohan Adapa f759275b0e openvpn: tests: functional: Use newer splinter API for finding links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:47:34 +03:00
Sunil Mohan Adapa 68a6427b19 ikiwiki: tests: functional: Use newer splinter API for finding links
Minimum required version of splinter is 0.13.0.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-09-19 07:47:11 +03:00
James Valleroy 0440b7ba52 tests: Show warning when app not available
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-18 17:08:39 -07:00
Veiko Aasa e31053eb92 samba: tests: Convert functional tests to non-BDD python format
- Also, fix an issue where share writability tests were performed always as an admin user.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-18 17:05:08 -07:00
James Valleroy 5367980163 Release v21.9 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.9
2021-09-18 10:07:51 -04:00
James Valleroy d80e8b0ba8 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-18 10:07:17 -04:00
James Valleroy 0eed9ec888 locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-18 09:35:00 -04:00
Andrij Mizyk ed48bc1467 Translated using Weblate (Ukrainian)
Currently translated at 75.4% (1142 of 1513 strings)
2021-09-18 15:33:07 +02:00
池边树下 584d8a7215 Translated using Weblate (Chinese (Simplified))
Currently translated at 48.2% (730 of 1513 strings)
2021-09-18 15:33:06 +02:00
ikmaak 2815a30f92 Translated using Weblate (Dutch)
Currently translated at 99.7% (1509 of 1513 strings)
2021-09-18 15:33:06 +02:00
Sunil Mohan Adapa 28c1d5eda3 web_framework, tests: Workaround captcha 0.5.6 vs. Django 3.2
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-18 08:36:46 -04:00
Veiko Aasa c5c1f5594d gitweb: tests: functional: Fix test failure if initial default branch is not master
Closes #2101.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-18 00:04:33 -07:00
Veiko Aasa 00be64036a gitweb: tests: Convert functional tests to non-BDD python format
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-18 00:04:24 -07:00
Andrij Mizyk e2c27a794c Translated using Weblate (Ukrainian)
Currently translated at 73.6% (1114 of 1513 strings)
2021-09-17 20:30:00 +02:00
Andrij Mizyk ea6ee0f35f Translated using Weblate (Ukrainian)
Currently translated at 70.9% (1074 of 1513 strings)
2021-09-17 18:32:46 +02:00
Andrij Mizyk e9a9c72256 Translated using Weblate (Ukrainian)
Currently translated at 67.8% (1027 of 1513 strings)
2021-09-17 15:30:26 +02:00
109247019824 1e124e8b7c Translated using Weblate (Bulgarian)
Currently translated at 2.0% (31 of 1513 strings)
2021-09-15 23:34:40 +02:00