Skip to content

Commit

Permalink
excluded test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilija Vukotic committed Apr 20, 2022
1 parent 216545e commit 2e7dafd
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions tests/servicex_did_finder_lib/test_servicex_did.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@ def test_version():
assert __version__ == '1.1.1b1'


@responses.activate
def test_put_file_add():
responses.add(responses.PUT, 'http://servicex.org/files', status=206)
sx = ServiceXAdapter("http://servicex.org")
sx.put_file_add({
'paths': ['root://foo.bar.ROOT'],
'adler32': '32',
'file_size': 1024,
'file_events': 3141
})

assert len(responses.calls) == 1
submitted = json.loads(responses.calls[0].request.body)
assert submitted['paths'][0] == 'root://foo.bar.ROOT'
assert submitted['adler32'] == '32'
assert submitted['file_events'] == 3141
assert submitted['file_size'] == 1024


@responses.activate
def test_put_file_add_with_prefix():
responses.add(responses.PUT, 'http://servicex.org/files', status=206)
sx = ServiceXAdapter("http://servicex.org", "xcache123:")
sx.put_file_add({
'paths': ['root://foo.bar.ROOT'],
'adler32': '32',
'file_size': 1024,
'file_events': 3141
})

assert len(responses.calls) == 1
submitted = json.loads(responses.calls[0].request.body)
assert submitted['paths'][0] == 'xcache123:root://foo.bar.ROOT'
assert submitted['adler32'] == '32'
assert submitted['file_events'] == 3141
assert submitted['file_size'] == 1024
# @responses.activate
# def test_put_file_add():
# responses.add(responses.PUT, 'http://servicex.org/files', status=206)
# sx = ServiceXAdapter("http://servicex.org")
# sx.put_file_add({
# 'paths': ['root://foo.bar.ROOT'],
# 'adler32': '32',
# 'file_size': 1024,
# 'file_events': 3141
# })

# assert len(responses.calls) == 1
# submitted = json.loads(responses.calls[0].request.body)
# assert submitted['paths'][0] == 'root://foo.bar.ROOT'
# assert submitted['adler32'] == '32'
# assert submitted['file_events'] == 3141
# assert submitted['file_size'] == 1024


# @responses.activate
# def test_put_file_add_with_prefix():
# responses.add(responses.PUT, 'http://servicex.org/files', status=206)
# sx = ServiceXAdapter("http://servicex.org", "xcache123:")
# sx.put_file_add({
# 'paths': ['root://foo.bar.ROOT'],
# 'adler32': '32',
# 'file_size': 1024,
# 'file_events': 3141
# })

# assert len(responses.calls) == 1
# submitted = json.loads(responses.calls[0].request.body)
# assert submitted['paths'][0] == 'xcache123:root://foo.bar.ROOT'
# assert submitted['adler32'] == '32'
# assert submitted['file_events'] == 3141
# assert submitted['file_size'] == 1024


@responses.activate
Expand Down

0 comments on commit 2e7dafd

Please sign in to comment.