Verified Commit 022a439f authored by Adam Mercer's avatar Adam Mercer
Browse files

add initial testing of gwkoji.rpm

parent b9c70fc1
# -*- 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,
)
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