TT#121955 use mock from unittest

* mock is now part of the Python standard library,
  available as unittest.mock in Python 3.3 onwards.
  https://pypi.org/project/mock/

Change-Id: Id5a5d4a5020821def08a3cbf2a6d528d43c4d48c
pull/5/head
Victor Seva 3 years ago
parent 29e328b069
commit 27b46f9745

@ -1,4 +1,4 @@
# Copyright (C) 2015 The Sipwise Team - http://sipwise.com
# Copyright (C) 2015-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -12,9 +12,9 @@
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
from mock import call
from mock import mock_open
from mock import patch
from unittest.mock import call
from unittest.mock import mock_open
from unittest.mock import patch
from hotfix import models
from hotfix import utils

@ -1,4 +1,4 @@
# Copyright (C) 2017-2020 The Sipwise Team - http://sipwise.com
# Copyright (C) 2017-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -12,10 +12,11 @@
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import call
from unittest.mock import patch
from django.test import override_settings
from django.urls import reverse
from mock import call
from mock import patch
from rest_framework import status
from rest_framework.test import APITestCase

@ -1,4 +1,4 @@
# Copyright (C) 2017 The Sipwise Team - http://sipwise.com
# Copyright (C) 2017-20222 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -11,9 +11,10 @@
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this prograproj. If not, see <http://www.gnu.org/licenses/>.
# with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import patch
from django.test import SimpleTestCase
from mock import patch
from release_dashboard import tasks

@ -1,4 +1,4 @@
# Copyright (C) 2017 The Sipwise Team - http://sipwise.com
# Copyright (C) 2017-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -11,11 +11,12 @@
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this prograproj. If not, see <http://www.gnu.org/licenses/>.
# with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import call
from unittest.mock import patch
from django.test import override_settings
from django.test import SimpleTestCase
from mock import call
from mock import patch
from release_dashboard.utils import docker

@ -1,4 +1,4 @@
# Copyright (C) 2015-2020 The Sipwise Team - http://sipwise.com
# Copyright (C) 2015-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -13,10 +13,10 @@
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
from os.path import join
from unittest.mock import mock_open
from unittest.mock import patch
from django.test import override_settings
from mock import mock_open
from mock import patch
from .base import BaseTest
from repoapi.conf import settings

@ -1,4 +1,4 @@
# Copyright (C) 2015 The Sipwise Team - http://sipwise.com
# Copyright (C) 2015-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -13,11 +13,11 @@
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from unittest.mock import call
from unittest.mock import mock_open
from unittest.mock import patch
from django.conf import settings
from mock import call
from mock import mock_open
from mock import patch
from repoapi.models import JenkinsBuildInfo
from repoapi.test.base import BaseTest

@ -1,4 +1,4 @@
# Copyright (C) 2017-2020 The Sipwise Team - http://sipwise.com
# Copyright (C) 2017-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -12,8 +12,9 @@
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import patch
from django.test import override_settings
from mock import patch
from repoapi import utils
from repoapi.test.base import BaseTest

@ -1,4 +1,4 @@
# Copyright (C) 2016 The Sipwise Team - http://sipwise.com
# Copyright (C) 2016-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -12,8 +12,9 @@
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import patch
from django.conf import settings
from mock import patch
from repoapi.models import JenkinsBuildInfo
from repoapi.models import WorkfrontNoteInfo

@ -1,2 +1 @@
-r common.txt
mock

Loading…
Cancel
Save