wip
This commit is contained in:
parent
4916b368a5
commit
556dddc9d0
4 changed files with 10 additions and 10 deletions
|
|
@ -24,7 +24,7 @@ class TestAddArchiveType(unittest.TestCase):
|
||||||
self.insert_execute = mock.MagicMock()
|
self.insert_execute = mock.MagicMock()
|
||||||
self.verify_name_internal = mock.patch('kojihub.kojihub.verify_name_internal').start()
|
self.verify_name_internal = mock.patch('kojihub.kojihub.verify_name_internal').start()
|
||||||
self.get_archive_type = mock.patch('kojihub.kojihub.get_archive_type').start()
|
self.get_archive_type = mock.patch('kojihub.kojihub.get_archive_type').start()
|
||||||
self.QueryProcessor = mock.patch('kojihub.QueryProcessor',
|
self.QueryProcessor = mock.patch('kojihub.kojihub.QueryProcessor',
|
||||||
side_effect=self.getQuery).start()
|
side_effect=self.getQuery).start()
|
||||||
self.queries = []
|
self.queries = []
|
||||||
self.query_execute = mock.MagicMock()
|
self.query_execute = mock.MagicMock()
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ import kojihub
|
||||||
class TestCreateBuildTarget(unittest.TestCase):
|
class TestCreateBuildTarget(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.get_build_targets = mock.patch('kojihub.get_build_targets').start()
|
self.get_build_targets = mock.patch('kojihub.kojihub.get_build_targets').start()
|
||||||
self.get_tag = mock.patch('kojihub.get_tag').start()
|
self.get_tag = mock.patch('kojihub.kojihub.get_tag').start()
|
||||||
self.verify_name_internal = mock.patch('kojihub.verify_name_internal').start()
|
self.verify_name_internal = mock.patch('kojihub.kojihub.verify_name_internal').start()
|
||||||
self.context = mock.patch('kojihub.context').start()
|
self.context = mock.patch('kojihub.kojihub.context').start()
|
||||||
# It seems MagicMock will not automatically handle attributes that
|
# It seems MagicMock will not automatically handle attributes that
|
||||||
# start with "assert"
|
# start with "assert"
|
||||||
self.context.session.assertPerm = mock.MagicMock()
|
self.context.session.assertPerm = mock.MagicMock()
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ IP = kojihub.InsertProcessor
|
||||||
class TestCreateImageBuild(unittest.TestCase):
|
class TestCreateImageBuild(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.get_build = mock.patch('kojihub.get_build').start()
|
self.get_build = mock.patch('kojihub.kojihub.get_build').start()
|
||||||
self.exports = kojihub.RootExports()
|
self.exports = kojihub.RootExports()
|
||||||
self.InsertProcessor = mock.patch('kojihub.InsertProcessor',
|
self.InsertProcessor = mock.patch('kojihub.kojihub.InsertProcessor',
|
||||||
side_effect=self.getInsert).start()
|
side_effect=self.getInsert).start()
|
||||||
self.inserts = []
|
self.inserts = []
|
||||||
self.insert_execute = mock.MagicMock()
|
self.insert_execute = mock.MagicMock()
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ IP = kojihub.InsertProcessor
|
||||||
class TestCreateMavenBuild(unittest.TestCase):
|
class TestCreateMavenBuild(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.get_build = mock.patch('kojihub.get_build').start()
|
self.get_build = mock.patch('kojihub.kojihub.get_build').start()
|
||||||
self.exports = kojihub.RootExports()
|
self.exports = kojihub.RootExports()
|
||||||
self.session = mock.MagicMock()
|
self.session = mock.MagicMock()
|
||||||
self.context = mock.patch('kojihub.context').start()
|
self.context = mock.patch('kojihub.kojihub.context').start()
|
||||||
self.context_db = mock.patch('koji.db.context').start()
|
self.context_db = mock.patch('koji.db.context').start()
|
||||||
self.context.session.assertPerm = mock.MagicMock()
|
self.context.session.assertPerm = mock.MagicMock()
|
||||||
self.InsertProcessor = mock.patch('kojihub.InsertProcessor',
|
self.InsertProcessor = mock.patch('kojihub.kojihub.InsertProcessor',
|
||||||
side_effect=self.getInsert).start()
|
side_effect=self.getInsert).start()
|
||||||
self.inserts = []
|
self.inserts = []
|
||||||
self.insert_execute = mock.MagicMock()
|
self.insert_execute = mock.MagicMock()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue