Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Adam Mercer
Koji Packager
Commits
022a439f
Verified
Commit
022a439f
authored
May 14, 2019
by
Adam Mercer
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initial testing of gwkoji.rpm
parent
b9c70fc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
gwkoji/tests/test_rpm.py
gwkoji/tests/test_rpm.py
+34
-0
No files found.
gwkoji/tests/test_rpm.py
0 → 100644
View file @
022a439f
# -*- coding: utf-8 -*-
# Copyright(C) 2019 Adam Mercer <adam.mercer@ligo.org>
#
# This file is part of gwkoji.
#
# gwkoji is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Test suite for gwkoji.rpm
"""
from
unittest
import
mock
from
..
import
rpm
as
gwkoji_rpm
@
mock
.
patch
(
'gwkoji.rpm.find_executable'
,
return_value
=
'/usr/bin/rpm'
)
@
mock
.
patch
(
'gwkoji.rpm.logged_check_output'
)
def
test_download_spec_sources
(
call
,
_
):
gwkoji_rpm
.
get_package_name_from_source_rpm
(
'foobar-1.0-1.el7'
,
logger
=
1
)
call
.
assert_called_once_with
(
(
'/usr/bin/rpm'
,
'--queryformat'
,
'%{NAME}'
,
'-qp'
,
'foobar-1.0-1.el7'
),
logger
=
1
,
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment