Skip to content

Commit

Permalink
Mock part of python 3.x (PyCQA#685)
Browse files Browse the repository at this point in the history
Now that Bandit is Python 3.5+ only, there is no need to install
the mock library. The mock library became part of base Python as
of Python 3.3. See [1]

[1] https://pypi.org/project/mock/

Signed-off-by: Eric Brown <browne@vmware.com>

Co-authored-by: Luke Hinds <7058938+lukehinds@users.noreply.github.com>
  • Loading branch information
2 people authored and mikespallino committed Jan 7, 2022
1 parent 39bfb78 commit 5e63e45
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 14 deletions.
1 change: 0 additions & 1 deletion test-requirements.txt
Expand Up @@ -4,7 +4,6 @@
coverage>=4.5.4 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
hacking>=2.0.0 # Apache-2.0
mock>=3.0.5 # BSD
stestr>=2.5.0 # Apache-2.0
testscenarios>=0.5.0 # Apache-2.0/BSD
testtools>=2.3.0 # MIT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cli/test_baseline.py
Expand Up @@ -6,10 +6,10 @@

import os
import subprocess
from unittest import mock

import fixtures
import git
import mock
import testtools

import bandit.cli.baseline as baseline
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cli/test_config_generator.py
Expand Up @@ -6,8 +6,8 @@

import importlib
import logging
from unittest import mock

import mock
import testtools
import yaml

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cli/test_main.py
Expand Up @@ -4,9 +4,9 @@

import logging
import os
from unittest import mock

import fixtures
import mock
import testtools

from bandit.cli import main as bandit
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/core/test_config.py
Expand Up @@ -5,10 +5,10 @@
import os
import tempfile
import textwrap
from unittest import mock
import uuid

import fixtures
import mock
import testtools

from bandit.core import config
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/core/test_context.py
Expand Up @@ -5,8 +5,8 @@
# SPDX-License-Identifier: Apache-2.0

import ast
from unittest import mock

import mock
import testtools

from bandit.core import context
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/core/test_issue.py
Expand Up @@ -4,7 +4,8 @@
#
# SPDX-License-Identifier: Apache-2.0

import mock
from unittest import mock

import testtools

import bandit
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/core/test_manager.py
Expand Up @@ -5,9 +5,9 @@
# SPDX-License-Identifier: Apache-2.0

import os
from unittest import mock

import fixtures
import mock
import testtools

from bandit.core import config
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/core/test_test_set.py
Expand Up @@ -4,7 +4,8 @@
#
# SPDX-License-Identifier: Apache-2.0

import mock
from unittest import mock

from stevedore import extension
import testtools

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/formatters/test_html.py
Expand Up @@ -5,9 +5,9 @@

import collections
import tempfile
from unittest import mock

import bs4
import mock
import testtools

import bandit
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/formatters/test_json.py
Expand Up @@ -5,8 +5,8 @@
import collections
import json
import tempfile
from unittest import mock

import mock
import testtools

import bandit
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/formatters/test_screen.py
Expand Up @@ -5,8 +5,8 @@

import collections
import tempfile
from unittest import mock

import mock
import testtools

import bandit
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/formatters/test_text.py
Expand Up @@ -5,8 +5,8 @@

import collections
import tempfile
from unittest import mock

import mock
import testtools

import bandit
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/formatters/test_yaml.py
Expand Up @@ -4,8 +4,8 @@

import collections
import tempfile
from unittest import mock

import mock
import testtools
import yaml

Expand Down

0 comments on commit 5e63e45

Please sign in to comment.