Directly import mock from unittest
It is not a separate package since Python 3.3 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com> (cherry picked from commit 3987688de6720d951bfeb0b49c364df9738b490b)
This commit is contained in:
parent
26959621a6
commit
fddce94704
@ -7,11 +7,7 @@ import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from collections import defaultdict
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
from kobo.rpmlib import parse_nvr
|
||||
|
||||
import unittest
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
from unittest import mock
|
||||
|
||||
import io
|
||||
import unittest
|
||||
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from copy import copy
|
||||
from io import StringIO
|
||||
from unittest import mock
|
||||
from ddt import ddt, data
|
||||
|
||||
import os
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import unittest
|
||||
import os
|
||||
from io import StringIO
|
||||
from unittest import mock
|
||||
|
||||
import kobo.conf
|
||||
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
from unittest import mock
|
||||
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from pungi import checks
|
||||
from tests.helpers import load_config, PKGSET_REPOS
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
import io
|
||||
import os
|
||||
|
||||
|
||||
@ -3,11 +3,7 @@
|
||||
|
||||
import logging
|
||||
import contextlib
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import productmd
|
||||
import os
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
from parameterized import parameterized
|
||||
|
||||
import os
|
||||
from io import StringIO
|
||||
from unittest import mock
|
||||
|
||||
from parameterized import parameterized
|
||||
|
||||
from tests import helpers
|
||||
from pungi import createiso
|
||||
|
||||
@ -3,11 +3,7 @@
|
||||
import glob
|
||||
import os
|
||||
import unittest
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from pungi.module_util import Modulemd
|
||||
from pungi.phases.createrepo import (
|
||||
|
||||
@ -1,14 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from typing import AnyStr, List
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
from typing import AnyStr, List
|
||||
|
||||
from tests import helpers
|
||||
from pungi.createiso import CreateIsoOpts
|
||||
|
||||
@ -3,10 +3,8 @@
|
||||
import copy
|
||||
import json
|
||||
import os
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from pungi.phases import gather
|
||||
from pungi.phases.gather import _mk_pkg_map
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from pungi.phases.gather.sources.source_module import GatherSourceModule
|
||||
from tests import helpers
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
|
||||
from tests import helpers
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
|
||||
from pungi.phases.image_build import ImageBuildPhase, CreateImageBuildThread
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
|
||||
from unittest import mock
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
@ -2,12 +2,7 @@
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
|
||||
from unittest import mock
|
||||
import os
|
||||
|
||||
from pungi.module_util import Modulemd
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import os
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from pungi.phases.kiwibuild import KiwiBuildPhase, RunKiwiBuildThread
|
||||
from tests.helpers import DummyCompose, PungiTestCase
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import unittest
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from unittest import mock
|
||||
import errno
|
||||
import os
|
||||
import stat
|
||||
from unittest import mock
|
||||
|
||||
from pungi import linker
|
||||
from tests import helpers
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
|
||||
from pungi.phases.livemedia_phase import LiveMediaPhase, LiveMediaThread
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from pungi import media_split
|
||||
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
|
||||
from datetime import datetime
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from pungi.notifier import PungiNotifier
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
import shlex
|
||||
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
|
||||
from tests import helpers
|
||||
|
||||
@ -3,12 +3,8 @@
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
import yaml
|
||||
from unittest import mock
|
||||
|
||||
from tests import helpers
|
||||
from pungi import ostree
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
|
||||
from tests import helpers
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
|
||||
from unittest import mock
|
||||
import os
|
||||
import unittest
|
||||
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import unittest
|
||||
import random
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from pungi.phases import weaver
|
||||
from tests.helpers import DummyCompose, boom
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from pungi.module_util import Modulemd
|
||||
from pungi.phases.pkgset import common
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import ddt
|
||||
from unittest import mock
|
||||
import os
|
||||
|
||||
import ddt
|
||||
import unittest
|
||||
import json
|
||||
import tempfile
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import json
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock
|
||||
from unittest import mock
|
||||
import os
|
||||
import re
|
||||
import unittest
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import os
|
||||
import random
|
||||
import shutil
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import mock
|
||||
import os
|
||||
import shutil
|
||||
from configparser import ConfigParser
|
||||
from unittest import mock
|
||||
|
||||
from tests.helpers import PungiTestCase, FIXTURE_DIR, touch, mk_boom
|
||||
from pungi_utils import unified_isos
|
||||
|
||||
Loading…
Reference in New Issue
Block a user