Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0051dd4c9f
15
components/orchestration/test_orchestrator.py
Normal file
15
components/orchestration/test_orchestrator.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import unittest
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
from dse_shared_libs.mock.response import MyResponse
|
||||||
|
|
||||||
|
from orchestrator import Orchestrator
|
||||||
|
|
||||||
|
|
||||||
|
class TestOrchestrator(unittest.TestCase):
|
||||||
|
def setUp(self) -> None:
|
||||||
|
with patch('requests.sessions.Session.get', MyResponse):
|
||||||
|
self.orc = Orchestrator()
|
||||||
|
|
||||||
|
def test(self):
|
||||||
|
...
|
||||||
7
components/shared/dse_shared_libs/mock/response.py
Normal file
7
components/shared/dse_shared_libs/mock/response.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
class MyResponse:
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
...
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def json(*args, **kwargs):
|
||||||
|
return {'cursor': []}
|
||||||
Loading…
x
Reference in New Issue
Block a user