Skip to content

Commit

Permalink
Final PR for release of 1.1.1 (#121)
Browse files Browse the repository at this point in the history
* Devel (#119)

* Bring changes from #109 back.

* Bump version number to 1.1.1.dev0

* Minor changes (#120)

* Bring changes from #109 back.

* Bump version number to 1.1.1.dev0

* * Update contributors
* Remove unsed comments

* Avoid conflict during merge into master.
  • Loading branch information
TobiasWeigel authored Feb 15, 2017
1 parent 833ebce commit a6d216d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ The developer team consists of:
* Robert Verkerk (SURFsara)
* Tobias Weigel (DKRZ)
* Themis Zamani (GRNET)
* Sofiane Bendoukha (DKRZ)
2 changes: 1 addition & 1 deletion b2handle/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.1.0"
__version__ = "1.1.1"

# The version as used in setup.py and docs/source/conf.py.

Expand Down
4 changes: 1 addition & 3 deletions b2handle/handleclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,9 @@ def retrieve_handle_record_json(self, handle):
LOGGER.debug('retrieve_handle_record_json...')

utilhandle.check_handle_syntax(handle)
# pdb.set_trace()
response = self.__send_handle_get_request(handle)
response_content = decoded_response(response)

# pdb.set_trace()

if hsresponses.handle_not_found(response):
return None
elif hsresponses.does_handle_exist(response):
Expand Down
14 changes: 2 additions & 12 deletions b2handle/tests/testcases/handleclient_write_patched_unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,10 @@ def test_modify_handle_value_several_inexistent(self, getpatch, putpatch):
# Get the payload passed to "requests.put"
passed_payload, _ = self.get_payload_headers_from_mockresponse(putpatch)
passed_payload.get('values', {})
# sort_lists(passed_payload)
# Compare with expected payload:
expected_payload = {"values": [{"index": 2, "type": "TEST100", "data": "new100"}, {"index": 2222, "ttl": 86400, "type": "TEST2", "data": "new2"}, {"index": 4, "ttl": 86400, "type": "TEST4", "data": "new4"}]}
expected_payload.get('values', {})
replace_timestamps(expected_payload)
# sort_lists(expected_payload)
self.assertEqual(sort_lists(passed_payload), sort_lists(expected_payload),
failure_message(expected=expected_payload,
passed=passed_payload,
Expand Down Expand Up @@ -510,9 +508,6 @@ def test_modify_handle_value_several_inexistent_2(self, getpatch, putpatch):
# Compare with expected payload:
expected_payload = {'values': [{'index': 2, 'type': 'TEST100', 'data': 'new100'}, {'index': 2222, 'ttl': 86400, 'type': 'TEST2', 'data': 'new2'}, {'index': 4, 'ttl': 86400, 'type': 'TEST4', 'data': 'new4'}, {'index': 3, 'type': 'TEST101', 'data': 'new101'}]}
expected_payload.get('values', {})
replace_timestamps(expected_payload)
sort_lists(expected_payload)

replace_timestamps(expected_payload)
self.assertEqual(sort_lists(passed_payload), sort_lists(expected_payload),
failure_message(expected=expected_payload,
Expand Down Expand Up @@ -760,18 +755,15 @@ def test_remove_additional_URL(self, getpatch, putpatch):

# Get the payload passed to "requests.put"
# For help, please see: http://www.voidspace.org.uk/python/mock/examples.html#checking-multiple-calls-with-mock
try:
passed_payload, _ = self.get_payload_headers_from_mockresponse(putpatch)
except Exception as exc:
import pdb; pdb.set_trace() # breakpoint 6579fbc8x //
passed_payload, _ = self.get_payload_headers_from_mockresponse(putpatch)


# Compare with expected payload:
expected_payload = {"values": [{"index": 1, "ttl": 86400, "type": "URL", "timestamp": "2015-09-30T15:54:32Z", "data": {"value": "www.url.foo", "format": "string"}}, {"index": 2, "ttl": 86400, "type": "10320/LOC", "timestamp": "2015-09-30T15:54:32Z", "data": {"value": "<locations><location href=\"http://second.foo\" /></locations>", "format": "string"}}]}
expected_payload.get('values', {})
replace_timestamps(expected_payload)
sort_lists(expected_payload)

replace_timestamps(expected_payload)
self.assertEqual(passed_payload, expected_payload,
failure_message(expected=expected_payload,
passed=passed_payload,
Expand Down Expand Up @@ -810,7 +802,6 @@ def test_remove_additional_URL_toempty(self, getpatch, putpatch):
replace_timestamps(expected_payload)
sort_lists(expected_payload)

replace_timestamps(expected_payload)
self.assertEqual(passed_payload, expected_payload,
failure_message(expected=expected_payload,
passed=passed_payload,
Expand Down Expand Up @@ -850,7 +841,6 @@ def test_remove_additional_URL_several(self, getpatch, putpatch):
# Compare with expected payload:
expected_payload = {"values": [{"index": 1, "ttl": 86400, "type": "URL", "timestamp": "2015-09-30T15:54:32Z", "data": {"value": "www.url.foo", "format": "string"}}]}
replace_timestamps(expected_payload)

self.assertEqual(passed_payload, expected_payload,
failure_message(expected=expected_payload,
passed=passed_payload,
Expand Down

0 comments on commit a6d216d

Please sign in to comment.