def testCreateFromPackage(self):
    makepkginfo = '/tmp/makepkginfo'
    catalogs = ['testing', 'stable']
    filename = 'foo'
    description = 'foo package description!!'
    display_name = 'Display Name'
    stdout = 'foo xml'
    stderr = ''
    status = 0
    args = [makepkginfo, filename, '--description=%s' % description,
            '--displayname=%s' % display_name,
            '--catalog=testing', '--catalog=stable']

    self.stubs.Set(
        pkgs.plist, 'MunkiPackageInfoPlist', self.mox.CreateMockAnything())
    mock_plist = self.mox.CreateMockAnything()
    self.MockOut('VerifyMunkiInstall')
    self.MockOut('_GetMunkiPath')
    self.mpi.VerifyMunkiInstall().AndReturn(None)
    self.mpi._GetMunkiPath(pkgs.MAKEPKGINFO).AndReturn(makepkginfo)
    mock_popen = self.mox.CreateMockAnything()
    self.stubs.Set(pkgs, 'subprocess', self.mox.CreateMock(pkgs.subprocess))
    pkgs.subprocess.Popen(
        args,
        stdin=None, stdout=pkgs.subprocess.PIPE, stderr=pkgs.subprocess.PIPE,
        close_fds=True,
        shell=False).AndReturn(mock_popen)
    mock_popen.communicate(None).AndReturn((stdout, stderr))
    mock_popen.poll().AndReturn(status)
    pkgs.plist.MunkiPackageInfoPlist(stdout).AndReturn(mock_plist)
    mock_plist.Parse().AndReturn(None)

    self.mox.ReplayAll()
    self.mpi.CreateFromPackage(filename, description, display_name, catalogs)
    self.assertEqual(self.mpi.filename, filename)
    self.mox.VerifyAll()
add a config as one of the global configs.
dataset/ETHPy150Open google/simian/src/tests/simian/mac/munki/pkgs_test.py/MunkiPackageInfoTest.testCreateFromPackage--crossover with--dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/testing/config.py/Config.register