Verified Commit e4b14614 authored by Adam Mercer's avatar Adam Mercer
Browse files

add tests for build._rpmbuild_args()

parent 1ffd4d2a
......@@ -33,3 +33,22 @@ def test_download_spec_sources(call, _):
"outdir", "test.spec"],
@mock.patch('', return_value='/usr/bin/rpmbuild')
def test_rpmbuild_args(_):
args = gwkoji_build._rpmbuild_args(
'-bs', 'foobar-1.0-1.spec', tmpdir='/tmp'
assert args == [
'/usr/bin/rpmbuild', '--verbose', '--define', '_topdir /tmp',
'-bs', 'foobar-1.0-1.spec'
@mock.patch('', return_value='/usr/bin/rpmbuild')
def test_rpmbuild_args_none(_):
args = gwkoji_build._rpmbuild_args('-bs', 'foobar-1.0-1.spec', tmpdir=None)
assert args == [
'/usr/bin/rpmbuild', '--verbose', '-bs', 'foobar-1.0-1.spec'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment