mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
replace mock with unittest.mock
This commit is contained in:
@@ -3,7 +3,7 @@ from datetime import datetime
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
from mock import ANY
|
from unittest.mock import ANY
|
||||||
from sqlalchemy.exc import SQLAlchemyError
|
from sqlalchemy.exc import SQLAlchemyError
|
||||||
from sqlalchemy.orm.exc import NoResultFound
|
from sqlalchemy.orm.exc import NoResultFound
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import os
|
|||||||
from flask import json
|
from flask import json
|
||||||
import jsonschema
|
import jsonschema
|
||||||
|
|
||||||
|
|
||||||
def validate(json_string, schema_filename):
|
def validate(json_string, schema_filename):
|
||||||
schema_dir = os.path.join(os.path.dirname(__file__), 'schemas')
|
schema_dir = os.path.join(os.path.dirname(__file__), 'schemas')
|
||||||
resolver = jsonschema.RefResolver('file://' + schema_dir + '/', None)
|
resolver = jsonschema.RefResolver('file://' + schema_dir + '/', None)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from mock import ANY
|
from unittest.mock import ANY
|
||||||
|
|
||||||
from app.statsd_decorators import statsd
|
from app.statsd_decorators import statsd
|
||||||
import app
|
import app
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import boto3
|
import boto3
|
||||||
import mock
|
from unittest import mock
|
||||||
import pytest
|
import pytest
|
||||||
from alembic.command import upgrade
|
from alembic.command import upgrade
|
||||||
from alembic.config import Config
|
from alembic.config import Config
|
||||||
|
|||||||
Reference in New Issue
Block a user