-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2713 from kbase/DATAUP-497_ujs_py_cruft_removal
DATAUP-497: Removing old code relating to the defunct UJS
- Loading branch information
Showing
8 changed files
with
60 additions
and
1,256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import unittest | ||
import biokbase.narrative.clients as clients | ||
|
||
from biokbase.workspace.client import Workspace as WS_Client | ||
from biokbase.narrative_method_store.client import NarrativeMethodStore as NMS_Client | ||
from biokbase.catalog.Client import Catalog as Catalog_Client | ||
from biokbase.service.Client import Client as Service_Client | ||
from biokbase.execution_engine2.execution_engine2Client import ( | ||
execution_engine2 as EE2_Client, | ||
) | ||
|
||
|
||
class ClientsTestCase(unittest.TestCase): | ||
def test_valid_clients(self): | ||
name_to_type = { | ||
"workspace": WS_Client, | ||
"execution_engine2": EE2_Client, | ||
"narrative_method_store": NMS_Client, | ||
"service": Service_Client, | ||
"catalog": Catalog_Client, | ||
} | ||
|
||
for client_name, client_type in name_to_type.items(): | ||
client = clients.get(client_name) | ||
self.assertIsInstance(client, client_type) | ||
|
||
def test_invalid_clients(self): | ||
invalid_names = ["service_wizard", "ee2", "ws"] | ||
|
||
for name in invalid_names: | ||
with self.assertRaisesRegex(ValueError, "Unknown client name"): | ||
clients.get(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.