Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
gdubicki committed Dec 29, 2021
1 parent 21ccba9 commit c38c15b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/test_app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
import os
from datetime import datetime
import re
import pytest
from bs4 import BeautifulSoup
from pypuppetdb.types import Node
Expand Down Expand Up @@ -1260,8 +1259,8 @@ def test_custom_title(client, mocker,


def test_query_view(client, mocker,
mock_puppetdb_environments,
mock_puppetdb_default_nodes):
mock_puppetdb_environments,
mock_puppetdb_default_nodes):
rv = client.get('/query')
assert rv.status_code == 200

Expand All @@ -1273,15 +1272,13 @@ def test_query_view(client, mocker,


def test_query__some_response(client, mocker,
mock_puppetdb_environments,
mock_puppetdb_default_nodes):

mock_puppetdb_environments,
mock_puppetdb_default_nodes):
app.app.config['WTF_CSRF_ENABLED'] = False

query_data = [
{'certname': 'foobar'},
]
dbquery = MockDbQuery(query_data)
mocker.patch.object(app.puppetdb, '_query', return_value=query_data)

data = {
Expand Down Expand Up @@ -1310,11 +1307,9 @@ def test_query__some_response(client, mocker,
def test_query__empty_response(client, mocker,
mock_puppetdb_environments,
mock_puppetdb_default_nodes):

app.app.config['WTF_CSRF_ENABLED'] = False

query_data = []
dbquery = MockDbQuery(query_data)
mocker.patch.object(app.puppetdb, '_query', return_value=query_data)

data = {
Expand Down Expand Up @@ -1342,7 +1337,6 @@ def test_query__empty_response(client, mocker,
def test_query__error_response(client, mocker,
mock_puppetdb_environments,
mock_puppetdb_default_nodes):

app.app.config['WTF_CSRF_ENABLED'] = False

error_message = "Invalid query: (...)"
Expand Down

0 comments on commit c38c15b

Please sign in to comment.