def test_bad_loglevel(self): try: out, err, exit_code = run_pyff("--loglevel=TRACE") except ValueError as ex: assert ('TRACE' in str(ex))
def test_version(self): out, err, exit_code = run_pyff("--version") assert (pyffversion in out) assert (exit_code == 0)
def test_bad_arg(self): out, err, exit_code = run_pyff("--snartibartfast") assert (exit_code == 2) assert ('snartibartfast' in out)
def test_run_signer_logfile(self): out, err, exit_code = run_pyff("--loglevel=DEBUG", "--logfile=%s" % self.logfile, self.signer) assert (exit_code == 0)
def test_help(self): out, err, exit_code = run_pyff("--help") assert (pyffdoc in out) assert (exit_code == 0)
def test_run_signer(self): out, err, exit_code = run_pyff("--loglevel=DEBUG", self.signer) assert err assert (exit_code == 0)
def test_run_bad(self): out, err, exit_code = run_pyff("--loglevel=DEBUG", self.bad) assert 'Traceback' in err assert 'No pipe named snartibartifast is installed' in err assert (exit_code == 255)
def test_bad_loglevel(self): try: out, err, exit_code = run_pyff("--loglevel=TRACE") except ValueError, ex: assert ('TRACE' in str(ex))
def test_run_signer_logfile(self): out, err, exit_code = run_pyff("--loglevel=DEBUG", "--logfile=%s" % self.logfile, self.signer) assert (not out) assert (exit_code == 0)
def test_run_bad(self): out, err, exit_code = run_pyff("--loglevel=DEBUG", self.bad) assert (not out) assert 'Traceback' in err assert 'No pipe named snartibartifast is installed' in err assert (exit_code == 255)
def test_run_signer(self): out, err, exit_code = run_pyff("--loglevel=DEBUG", self.signer) assert (not out) assert err assert (exit_code == 0)
def test_bad_arg(self): out, err, exit_code = run_pyff("--snartibartfast") assert exit_code == 2 assert "snartibartfast" in out
def test_run_bad(self): out, err, exit_code = run_pyff("--loglevel=DEBUG", self.bad) assert not out assert "Traceback" in err assert "No pipe named snartibartifast is installed" in err assert exit_code == 255