-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test and updated request methods
- Loading branch information
1 parent
ff6735b
commit c9fe461
Showing
14 changed files
with
502 additions
and
158 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
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
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.
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,101 @@ | ||
from pephubclient.pephubclient import PEPHubClient | ||
import pytest | ||
|
||
|
||
@pytest.mark.skip(reason="Manual test") | ||
class TestViewsManual: | ||
|
||
def test_get(self): | ||
ff = PEPHubClient().view.get( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"test_view", | ||
) | ||
print(ff) | ||
|
||
def test_create(self): | ||
PEPHubClient().view.create( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"test_view", | ||
sample_list=["orange", "grape1", "apple1"], | ||
) | ||
|
||
def test_delete(self): | ||
PEPHubClient().view.delete( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"test_view", | ||
) | ||
|
||
def test_add_sample(self): | ||
PEPHubClient().view.add_sample( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"test_view", | ||
"name", | ||
) | ||
|
||
def test_delete_sample(self): | ||
PEPHubClient().view.remove_sample( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"test_view", | ||
"name", | ||
) | ||
|
||
|
||
@pytest.mark.skip(reason="Manual test") | ||
class TestSamplesManual: | ||
def test_manual(self): | ||
ff = PEPHubClient().sample.get( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"grape1", | ||
) | ||
ff | ||
|
||
def test_update(self): | ||
ff = PEPHubClient().sample.get( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"newf", | ||
) | ||
ff.update({"shefflab": "test1"}) | ||
ff["sample_type"] = "new_type" | ||
PEPHubClient().sample.update( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"newf", | ||
sample_dict=ff, | ||
) | ||
|
||
def test_add(self): | ||
ff = { | ||
"genome": "phc_test1", | ||
"sample_type": "phc_test", | ||
} | ||
PEPHubClient().sample.create( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"new_2222", | ||
overwrite=False, | ||
sample_dict=ff, | ||
) | ||
|
||
def test_delete(self): | ||
PEPHubClient().sample.remove( | ||
"databio", | ||
"bedset1", | ||
"default", | ||
"new_2222", | ||
) |
Oops, something went wrong.