mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-08 06:08:12 +08:00
Moved prometheus monitoring into flask blueprint
This commit is contained in:
committed by
Alok Saldanha
parent
d5008893f7
commit
0f79e1a010
@@ -1,7 +1,9 @@
|
||||
import unittest
|
||||
from unittest.mock import MagicMock, Mock, patch
|
||||
|
||||
from cellxgene_gateway.gateway import app
|
||||
from flask import Flask
|
||||
|
||||
from cellxgene_gateway.gateway_blueprint import gateway_blueprint
|
||||
from cellxgene_gateway.items.item import ItemType
|
||||
from cellxgene_gateway.items.s3.s3item import S3Item
|
||||
from cellxgene_gateway.items.s3.s3item_source import S3ItemSource
|
||||
@@ -82,6 +84,8 @@ class TestScanDirectory(unittest.TestCase):
|
||||
|
||||
s3func.return_value = S3Mock
|
||||
source = S3ItemSource("my-bucket")
|
||||
app = Flask(__name__)
|
||||
app.register_blueprint(gateway_blueprint)
|
||||
with app.test_request_context(query_string="refresh=true") as test_context:
|
||||
tree = source.scan_directory()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user