-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error checking when adding to blaze server. #1459
Error checking when adding to blaze server. #1459
Conversation
_get_auth.cache[app] = ( | ||
_get_option('authorization', options, None) or (lambda a: True) | ||
) | ||
_get_format.cache[app] = dict((f.name, f) for f in _get_option('formats', options)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably be a dict comprehension now
It is hard to see what actually changed here, could you split this into two commits? |
Also, since this is mainly a style change, I would like to say that I don't find |
resp = empty_server.post('/add', | ||
headers=mimetype(serial), | ||
data=payload) | ||
assert resp.status_code == 409 # CONFLICT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these error codes not defined somewhere, and if not, should we make a small namespace for them like: rc.CONFLICT
ea78b32
to
1a7fda0
Compare
@llllllllll I split the commit up; 1a7fda0 is the core of the bugfixes, while 80da240 is the style and indentation fixup. |
|
||
@pytest.mark.parametrize('serial', all_formats) | ||
def test_add_data_twice_error(empty_server, serial): | ||
with temp_server(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a pytest.yield_fixture?
Refactor redundant code and cleanup.
Does basic error checking when adding a new data set to a blaze server (
/add
endpoint):discover
able to verify the data is loadable and queryable;I also reformatted the indentation in other tests for consistency.