mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-11 00:00:55 +08:00
Merge pull request #67 from Novartis/docker
Remove version pins to upgrade Flask
This commit is contained in:
+5
-5
@@ -2,9 +2,9 @@ name: cellxgene-gateway
|
|||||||
channels:
|
channels:
|
||||||
- conda-forge
|
- conda-forge
|
||||||
dependencies:
|
dependencies:
|
||||||
- python=3.7
|
- python=3.9
|
||||||
- requests
|
- requests
|
||||||
- flask<2.0.0,>=1.0.2
|
- flask
|
||||||
- psutil
|
- psutil
|
||||||
- black
|
- black
|
||||||
- twine
|
- twine
|
||||||
@@ -13,6 +13,6 @@ dependencies:
|
|||||||
- pip
|
- pip
|
||||||
- pip:
|
- pip:
|
||||||
- pre_commit
|
- pre_commit
|
||||||
- flask-api==2.0
|
- flask-api
|
||||||
- werkzeug==1.0.1
|
- werkzeug
|
||||||
- cellxgene>=0.15
|
- cellxgene
|
||||||
|
|||||||
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
cellxgene>=0.15
|
cellxgene
|
||||||
flask<2.0.0,>=1.0.2
|
flask
|
||||||
flask-api==2.0
|
flask-api
|
||||||
werkzeug==1.0.1
|
werkzeug
|
||||||
psutil
|
psutil
|
||||||
requests
|
requests
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import MagicMock, Mock, patch
|
from unittest.mock import MagicMock, Mock, patch
|
||||||
|
|
||||||
|
from cellxgene_gateway.gateway import app
|
||||||
from cellxgene_gateway.items.item import ItemType
|
from cellxgene_gateway.items.item import ItemType
|
||||||
from cellxgene_gateway.items.s3.s3item import S3Item
|
from cellxgene_gateway.items.s3.s3item import S3Item
|
||||||
from cellxgene_gateway.items.s3.s3item_source import S3ItemSource
|
from cellxgene_gateway.items.s3.s3item_source import S3ItemSource
|
||||||
@@ -24,10 +25,7 @@ class TestScanDirectory(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@patch("s3fs.S3FileSystem")
|
@patch("s3fs.S3FileSystem")
|
||||||
@patch("flask.request")
|
def test__GIVEN_multilevel_bucket_THEN_properly_recurses_suburls(self, s3func):
|
||||||
def test__GIVEN_multilevel_bucket_THEN_properly_recurses_suburls(
|
|
||||||
self, requestMock, s3func
|
|
||||||
):
|
|
||||||
class S3Mock:
|
class S3Mock:
|
||||||
def exists(path):
|
def exists(path):
|
||||||
if path in [
|
if path in [
|
||||||
@@ -83,8 +81,8 @@ class TestScanDirectory(unittest.TestCase):
|
|||||||
raise Exception("isfile called with " + path)
|
raise Exception("isfile called with " + path)
|
||||||
|
|
||||||
s3func.return_value = S3Mock
|
s3func.return_value = S3Mock
|
||||||
requestMock.args.get.return_value = "true"
|
|
||||||
source = S3ItemSource("my-bucket")
|
source = S3ItemSource("my-bucket")
|
||||||
|
with app.test_request_context(query_string="refresh=true") as test_context:
|
||||||
tree = source.scan_directory()
|
tree = source.scan_directory()
|
||||||
|
|
||||||
def s3item_compare(i1, i2, msg=""):
|
def s3item_compare(i1, i2, msg=""):
|
||||||
|
|||||||
Reference in New Issue
Block a user