mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-05 20:58:42 +02:00
Fix unit tests to use the new code path to run osc
This commit is contained in:
@@ -234,10 +234,12 @@ class OscTestCase(unittest.TestCase):
|
||||
def _run_osc(self, *args):
|
||||
"""Runs osc, returning captured STDOUT as a string."""
|
||||
with unittest.mock.patch.dict(os.environ, {"OSC_CONFIG": self.oscrc}):
|
||||
cli = osc.commandline.Osc()
|
||||
argv = ['osc', '--no-keyring']
|
||||
argv = ["--no-keyring"]
|
||||
argv.extend(args)
|
||||
cli.main(argv=argv)
|
||||
try:
|
||||
osc.commandline.OscMainCommand.main(argv)
|
||||
except SystemExit:
|
||||
pass
|
||||
return sys.stdout.getvalue()
|
||||
|
||||
def _change_to_pkg(self, name):
|
||||
|
Reference in New Issue
Block a user