Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unit tests #215

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/mock_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
MONGO_CONFIG = {
"host": "mongodb",
"port": 12345,
"port": 27017,
"dbs": {
"access_control_db": DB_CONFIG,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class TestAdapter(TestCase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.db_name = "casbin_test"
self.db_port = 12345
self.db_port = 27017

def setUp(self):
self.clear_db()
Expand Down
4 changes: 2 additions & 2 deletions tests/security/test_cors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from unittest.mock import patch


@patch('flask_cors.CORS')
@patch('foca.security.cors.CORS')
def test_enable_cors(test_patch):
"""Test that CORS is called with app as a parameter
"""
app = Flask(__name__)
assert enable_cors(app) is None
assert test_patch.called_with(app)
test_patch.assert_called_with(app)
Loading