mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Add flake8 to gitlib-ci - closes #58
And fix the rest of the flake8 errors. Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
f81b1751ce
commit
5439084c84
63 files changed
+105
-82
No files matched your search
@@ -34,7 +34,7 @@ from plinth.signals import (domain_added, domain_removed, domainname_change,
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import components
|
||||
from .manifest import backup
|
||||
from .manifest import backup # noqa, pylint: disable=unused-import
|
||||
|
||||
version = 3
|
||||
|
||||
|
||||
@@ -275,7 +275,9 @@ def test_on_certificate_obtained(superuser_run, component):
|
||||
|
||||
|
||||
def test_on_certificate_obtained_with_all_domains(superuser_run, component):
|
||||
"""Test that certificate obtained event handler works for app with all domains."""
|
||||
"""Test that certificate obtained event handler works for app with
|
||||
all domains.
|
||||
"""
|
||||
component._domains = '*'
|
||||
component.on_certificate_obtained(['valid.example'],
|
||||
'/etc/letsencrypt/live/valid.example/')
|
||||
@@ -286,7 +288,9 @@ def test_on_certificate_obtained_with_all_domains(superuser_run, component):
|
||||
|
||||
|
||||
def test_on_certificate_obtained_irrelevant(superuser_run, component):
|
||||
"""Test that certificate obtained event handler works with irrelevant domain."""
|
||||
"""Test that certificate obtained event handler works with
|
||||
irrelevant domain.
|
||||
"""
|
||||
component.on_certificate_obtained(
|
||||
['irrelevant.example'], '/etc/letsencrypt/live/irrelevant.example/')
|
||||
_assert_copy_certificate_called(component, superuser_run, {})
|
||||
@@ -313,7 +317,9 @@ def test_on_certificate_renewed(superuser_run, component):
|
||||
|
||||
|
||||
def test_on_certificate_renewed_irrelevant(superuser_run, component):
|
||||
"""Test that certificate renewed event handler works for irrelevant domains."""
|
||||
"""Test that certificate renewed event handler works for
|
||||
irrelevant domains.
|
||||
"""
|
||||
component.on_certificate_renewed(
|
||||
['irrelevant.example'], '/etc/letsencrypt/live/irrelevant.example/')
|
||||
_assert_copy_certificate_called(component, superuser_run, {})
|
||||
@@ -340,7 +346,9 @@ def test_on_certificate_revoked(superuser_run, component):
|
||||
|
||||
|
||||
def test_on_certificate_revoked_irrelevant(superuser_run, component):
|
||||
"""Test that certificate revoked event handler works for irrelevant domains."""
|
||||
"""Test that certificate revoked event handler works for
|
||||
irrelevant domains.
|
||||
"""
|
||||
component.on_certificate_revoked(
|
||||
['irrelevant.example'], '/etc/letsencrypt/live/irrelevant.example/')
|
||||
_assert_copy_certificate_called(component, superuser_run, {})
|
||||
@@ -367,7 +375,9 @@ def test_on_certificate_deleted(superuser_run, component):
|
||||
|
||||
|
||||
def test_on_certificate_deleted_irrelevant(superuser_run, component):
|
||||
"""Test that certificate deleted event handler works for irrelevant domains."""
|
||||
"""Test that certificate deleted event handler works for
|
||||
irrelevant domains.
|
||||
"""
|
||||
component.on_certificate_deleted(
|
||||
['irrelevant.example'], '/etc/letsencrypt/live/irrelevant.example/')
|
||||
_assert_copy_certificate_called(component, superuser_run, {})
|
||||
|
||||
@@ -27,7 +27,6 @@ from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.http import require_POST
|
||||
|
||||
from plinth import actions
|
||||
from plinth.errors import ActionError
|
||||
from plinth.modules import letsencrypt
|
||||
|
||||
|
||||
Reference in new issue
Block a user