- Use unittest.mock instead external mock

This commit is contained in:
soksanichenko 2022-11-11 15:32:00 +02:00
parent eb35d7baac
commit b61e59d676
44 changed files with 44 additions and 44 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import unittest
from pungi.arch import (

View File

@ -1,4 +1,4 @@
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import logging
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -7,7 +7,7 @@ except ImportError:
import unittest
import six
import mock
from unittest import mock
from pungi import checks
from tests.helpers import load_config, PKGSET_REPOS

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
import six

View File

@ -2,7 +2,7 @@
import logging
import mock
from unittest import mock
import six
import os

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
from six.moves import StringIO

View File

@ -8,7 +8,7 @@ except ImportError:
import glob
import os
import mock
from unittest import mock
import six
from pungi.module_util import Modulemd

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
from productmd.extra_files import ExtraFiles

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
from pungi.phases.gather.methods import method_deps as deps
from tests import helpers

View File

@ -2,7 +2,7 @@
from collections import namedtuple
import copy
import mock
from unittest import mock
import os
import six

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
import six

View File

@ -4,7 +4,7 @@ import copy
import json
import os
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -5,7 +5,7 @@ try:
except ImportError:
import unittest
import mock
from unittest import mock
import six
from pungi.phases.gather.sources.source_module import GatherSourceModule

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import six

View File

@ -4,7 +4,7 @@ try:
import unittest2 as unittest
except ImportError:
import unittest
import mock
from unittest import mock
import os
import tempfile

View File

@ -5,7 +5,7 @@ try:
import unittest2 as unittest
except ImportError:
import unittest
import mock
from unittest import mock
import six

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import itertools
import mock
from unittest import mock
import os
import six

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import json
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import errno
import os
import stat

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import six

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os

View File

@ -4,7 +4,7 @@ try:
import unittest2 as unittest
except ImportError:
import unittest
import mock
from unittest import mock
from pungi import media_split

View File

@ -1,4 +1,4 @@
import mock
from unittest import mock
import os
import six

View File

@ -2,7 +2,7 @@
from datetime import datetime
import json
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -9,7 +9,7 @@ import shutil
import subprocess
from textwrap import dedent
import mock
from unittest import mock
import six
from six.moves import configparser

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import json
import copy

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os

View File

@ -2,7 +2,7 @@
import json
import mock
from unittest import mock
import os

View File

@ -4,7 +4,7 @@
import json
import os
import mock
from unittest import mock
import six
import yaml

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
try:

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -2,7 +2,7 @@
import os
import mock
from unittest import mock
import six
from pungi.module_util import Modulemd

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import ddt
import mock
from unittest import mock
import os
import six

View File

@ -6,7 +6,7 @@ try:
except ImportError:
import unittest
import mock
from unittest import mock
import six
import pungi.phases.repoclosure as repoclosure_phase

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
from pungi.runroot import Runroot

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
try:
import unittest2 as unittest

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
import pungi.phases.test as test_phase

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
import shutil
import six

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import argparse
import mock
from unittest import mock
import os
try: