Skip to content

Commit

Permalink
Updates tests for flake8 lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaldas committed Oct 27, 2020
1 parent d4b514f commit 1be7905
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 34 deletions.
8 changes: 4 additions & 4 deletions molecule/builder-xenial/tests/testutils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@


class Myvalues:
def __init__(self):
pass
def __init__(self):
pass


securedrop_test_vars = Myvalues()


def inject_vars(value):
res = Myvalues()
for key, value in value.items():
Expand Down
2 changes: 0 additions & 2 deletions molecule/testinfra/app-code/test_haveged.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import testutils

sdvars = testutils.securedrop_test_vars
Expand Down
2 changes: 0 additions & 2 deletions molecule/testinfra/app-code/test_securedrop_rqrequeue.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import testutils

securedrop_test_vars = testutils.securedrop_test_vars
Expand Down
2 changes: 0 additions & 2 deletions molecule/testinfra/app-code/test_securedrop_rqworker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import testutils

sdvars = testutils.securedrop_test_vars
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import testutils

sdvars = testutils.securedrop_test_vars
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import testutils

securedrop_test_vars = testutils.securedrop_test_vars
Expand Down
3 changes: 0 additions & 3 deletions molecule/testinfra/app/test_paxctld.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import pytest
import re


import testutils

securedrop_test_vars = testutils.securedrop_test_vars
Expand Down
1 change: 1 addition & 0 deletions molecule/testinfra/common/test_cron_apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
test_vars = testutils.securedrop_test_vars
testinfra_hosts = [test_vars.app_hostname, test_vars.monitor_hostname]


@pytest.mark.parametrize('dependency', [
'cron-apt',
'ntp'
Expand Down
1 change: 0 additions & 1 deletion molecule/testinfra/common/test_fpf_apt_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
testinfra_hosts = [test_vars.app_hostname, test_vars.monitor_hostname]



def test_fpf_apt_repo_present(host):
"""
Ensure the FPF apt repo, apt.freedom.press, is configured.
Expand Down
2 changes: 0 additions & 2 deletions molecule/testinfra/common/test_ip6tables.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import testutils

test_vars = testutils.securedrop_test_vars
Expand Down
2 changes: 0 additions & 2 deletions molecule/testinfra/common/test_platform.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

import testutils

test_vars = testutils.securedrop_test_vars
Expand Down
3 changes: 0 additions & 3 deletions molecule/testinfra/common/test_release_upgrades.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import pytest


import testutils

test_vars = testutils.securedrop_test_vars
Expand Down
12 changes: 3 additions & 9 deletions molecule/testinfra/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import io
import os
import yaml
import pytest
import testutils

# The config tests target staging by default. It's possible to override
Expand Down Expand Up @@ -54,18 +53,13 @@ def lookup_molecule_info():
return molecule_instance_config


# def pytest_namespace():
# return securedrop_import_testinfra_vars(target_host, with_header=True)
# @pytest.fixture(autouse=True)
# def set_all_vars():
# import fight
class Myvalues:
def __init__(self):
pass
def __init__(self):
pass


value = securedrop_import_testinfra_vars(target_host)
res = Myvalues()
for key, value in value.items():
setattr(res, key, value)
testutils.securedrop_test_vars = res

0 comments on commit 1be7905

Please sign in to comment.