Skip to content

Commit 45fa1df

Browse files
committed
tests: ro: Remove some redundant tests
* double connect is unittestable * the cert fail bit is unittestable * the query --flags bit uses privileged data so it's tough to maintain Signed-off-by: Cole Robinson <[email protected]>
1 parent 304e390 commit 45fa1df

1 file changed

Lines changed: 1 addition & 33 deletions

File tree

tests/test_ro_functional.py

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
Unit tests that do readonly functional tests against real bugzilla instances.
1212
"""
1313

14-
import os
15-
1614
import bugzilla
1715
import tests
1816

@@ -208,26 +206,6 @@ def testQueryURL(run_cli):
208206
_check(out, 22, "#553878 CLOSED")
209207

210208

211-
def testDoubleConnect():
212-
bz = _open_bz(REDHAT_URL)
213-
bz.connect(REDHAT_URL)
214-
215-
216-
def testQueryFlags(run_cli):
217-
bz = _open_bz(REDHAT_URL)
218-
219-
if not bz.logged_in:
220-
print("not logged in, skipping testQueryFlags")
221-
return
222-
223-
out = run_cli("bugzilla query --product 'Red Hat Enterprise Linux 5' "
224-
"--component virt-manager --bug_status CLOSED "
225-
"--flag rhel-5.4.0+", bz)
226-
assert len(out.splitlines()) > 13
227-
assert len(out.splitlines()) < 26
228-
assert "223805" in out
229-
230-
231209
def testQueryFixedIn(run_cli):
232210
bz = _open_bz(REDHAT_URL)
233211

@@ -348,17 +326,7 @@ def testFaults(run_cli):
348326
assert "--nosslverify" in out
349327

350328

351-
def testCertFail(run_cli):
352-
# No public setup that I know of to test cert succeeds, so
353-
# let's give it a bogus file and ensure it fails
354-
badcert = os.path.join(os.path.dirname(__file__), "..", "README.md")
355-
out = run_cli(
356-
"bugzilla --cert %s query --bug_id 123456" % badcert,
357-
None, expectfail=True)
358-
assert "PEM" in out
359-
360-
361-
def test_redhat():
329+
def test_redhat_version():
362330
bzversion = (5, 0)
363331
bz = _open_bz(REDHAT_URL)
364332

0 commit comments

Comments
 (0)