Clean CatalogForm
This commit is contained in:
@@ -19,7 +19,7 @@ from flask import (
|
|||||||
from pypuppetdb import connect
|
from pypuppetdb import connect
|
||||||
from pypuppetdb.QueryBuilder import *
|
from pypuppetdb.QueryBuilder import *
|
||||||
|
|
||||||
from puppetboard.forms import (CatalogForm, QueryForm)
|
from puppetboard.forms import QueryForm
|
||||||
from puppetboard.utils import (
|
from puppetboard.utils import (
|
||||||
get_or_abort, yield_or_stop, get_db_version,
|
get_or_abort, yield_or_stop, get_db_version,
|
||||||
jsonprint, prettyprint
|
jsonprint, prettyprint
|
||||||
|
|||||||
@@ -28,9 +28,3 @@ class QueryForm(FlaskForm):
|
|||||||
('pql', 'PQL'),
|
('pql', 'PQL'),
|
||||||
])
|
])
|
||||||
rawjson = BooleanField('Raw JSON')
|
rawjson = BooleanField('Raw JSON')
|
||||||
|
|
||||||
|
|
||||||
class CatalogForm(FlaskForm):
|
|
||||||
"""The form used to compare the catalogs of different nodes."""
|
|
||||||
compare = HiddenField('compare')
|
|
||||||
against = SelectField('against')
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from puppetboard import app, forms
|
|||||||
|
|
||||||
|
|
||||||
def test_form_valid(capsys):
|
def test_form_valid(capsys):
|
||||||
for form in [forms.QueryForm, forms.CatalogForm]:
|
for form in [forms.QueryForm]:
|
||||||
with app.app.test_request_context():
|
with app.app.test_request_context():
|
||||||
qf = form()
|
qf = form()
|
||||||
out, err = capsys.readouterr()
|
out, err = capsys.readouterr()
|
||||||
|
|||||||
Reference in New Issue
Block a user