remove unused variables/methods
This commit is contained in:
parent
921258749a
commit
c37effcbd7
8 changed files with 10 additions and 32 deletions
|
|
@ -39,22 +39,6 @@ class TestDeleteBuild(unittest.TestCase):
|
|||
refs.return_value = retval
|
||||
assert kojihub.delete_build(build='', strict=False) is False
|
||||
|
||||
@mock.patch('kojihub.context')
|
||||
@mock.patch('kojihub.get_build')
|
||||
def test_delete_build_check_last_used_raise_error(self, build, context):
|
||||
context.session.assertPerm = mock.MagicMock()
|
||||
references = ['tags', 'rpms', 'archives', 'images', 'last_used']
|
||||
for ref in references:
|
||||
context = mock.MagicMock()
|
||||
context.session.return_value = context
|
||||
|
||||
with mock.patch('kojihub.build_references') as refs:
|
||||
retval = defaultdict(dict)
|
||||
if ref == 'last_used':
|
||||
retval[ref] = time.time()+100
|
||||
refs.return_value = retval
|
||||
with self.assertRaises(GenericError):
|
||||
kojihub.delete_build(build='', strict=True)
|
||||
|
||||
@mock.patch('kojihub.context')
|
||||
@mock.patch('kojihub.get_build')
|
||||
|
|
@ -70,4 +54,4 @@ class TestDeleteBuild(unittest.TestCase):
|
|||
if ref == 'last_used':
|
||||
retval[ref] = time.time()+100
|
||||
refs.return_value = retval
|
||||
assert kojihub.delete_build(build='', strict=False) is False
|
||||
self.assertFalse(kojihub.delete_build(build='', strict=False))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue