Skip to content

Commit 9a1476b

Browse files
CADC-10021 - status method change. (#195)
1 parent 9fd62f1 commit 9a1476b

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

vos/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ edit_on_github = False
5050
github_project = opencadc/vostools
5151
install_requires = html2text>=2016.5.29 cadcutils>=1.2.1 future aenum
5252
# version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440)
53-
version = 3.3.2
53+
version = 3.3.3
5454

5555

5656
[entry_points]

vos/vos/tests/test_vos.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class Object(object):
4242
pass
4343

4444

45+
@patch('vos.vos.net.ws.WsCapabilities.get_access_url',
46+
Mock(return_value='http://foo.com/vospace'))
4547
def test_get_node_url():
4648
client = Client()
4749
with pytest.raises(TypeError):
@@ -783,6 +785,13 @@ def test_mkdir(self):
783785
'http://www.canfar.phys.uvic.ca/vospace/nodes/bar',
784786
headers=headers, data=str(node))
785787

788+
@patch('vos.vos.net.ws.WsCapabilities.get_access_url',
789+
Mock(return_value='http://foo.com/vospace'))
790+
def test_success_failure_case(self):
791+
with pytest.raises(OSError):
792+
client = Client()
793+
ignore = client.status('vos:test/node.fits', code='abc')
794+
786795

787796
class TestNode(unittest.TestCase):
788797
"""Test the vos Node class.

vos/vos/vos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ def status(self, uri, code=None):
28262826
status on.
28272827
:param code: NOT SUPPORTED.
28282828
"""
2829-
if not code:
2829+
if code:
28302830
raise OSError(errno.ENOSYS,
28312831
"Use of 'code' option values no longer supported.")
28322832
self.get_node(uri)

0 commit comments

Comments
 (0)