Skip to content

Commit

Permalink
Updated a few test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Watson authored and Nathan Watson committed Aug 9, 2018
1 parent a26a0c1 commit db7c17c
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions encode_utils/tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_extract_aws_upload_credentials(self):
aws_creds = {}
aws_creds["AWS_ACCESS_KEY_ID"] = access_key
aws_creds["AWS_SECRET_ACCESS_KEY"] = secret_key
aws_creds["AWS_SECURITY_TOKEN"] = session_token
aws_creds["AWS_SESSION_TOKEN"] = session_token
aws_creds["UPLOAD_URL"] = upload_url

self.assertEqual(res, aws_creds)
Expand All @@ -152,23 +152,7 @@ def test_make_search_url(self):
}

res = self.conn.make_search_url(search_args=query)
query = "search/?assay_title=ChIP-seq&biosample_type=primary+cell&limit=all&organ_slims=blood&type=Experiment"
self.assertEqual(res, os.path.join(self.conn.dcc_url, query))

def test_2_make_search_url(self):
"""
Tests the method ``make_search_url()`` for building the correct URL given the query arguments
to find ChIP-seq assays performed on primary cells from blood, and a limit of 1 search result.
"""
query = {
"assay_title": "ChIP-seq",
"biosample_type": "primary cell",
"organ_slims": "blood",
"type": "Experiment"
}

res = self.conn.make_search_url(search_args=query, limit=1)
query = "search/?assay_title=ChIP-seq&biosample_type=primary+cell&limit=1&organ_slims=blood&type=Experiment"
query = "search/?assay_title=ChIP-seq&biosample_type=primary+cell&organ_slims=blood&type=Experiment"
self.assertEqual(res, os.path.join(self.conn.dcc_url, query))

def test_get(self):
Expand Down

0 comments on commit db7c17c

Please sign in to comment.