Skip to content
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

Schema updates #9

Merged
merged 6 commits into from
Aug 8, 2023
Merged

Schema updates #9

merged 6 commits into from
Aug 8, 2023

Conversation

willronchetti
Copy link
Contributor

Copy link

@netsettler netsettler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comments are not blocking.

@@ -23,7 +23,7 @@ ENV NGINX_USER=nginx \
NVM_VERSION=v0.39.1 \
NODE_VERSION=16.14.0

# Configure Python3.7 venv
# Configure Python3.9 venv

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just remove the version here so it's all in one place? It's just not necessary to say what version in this particular comment.

@@ -8,7 +8,7 @@ def login(self, context, request, *, samesite):

def namespaced_authentication_policy_authenticated_userid(self, namespaced_authentication_policy, request,
set_user_info_property):
set_user_info_property = False
set_user_info_property = True

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still haven't figured out what this does. (i.e., I think a comment wouldn't hurt)

for key in ['access_key_id', 'file_format', 'title']:
assert key in props
# check access key id
assert props['access_key_id']['comment'] == 'Only admins are allowed to set this value.'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is comment really the name we define in our own data model? Probably too late(?), but I so wish it said another word (like "restriction_description" so it doesn't look meta-syntactic (and hence invisible to computation).

Unrelated, could the string you're looking for be a named constant so that light edits of the text don't break the tests? Or is the place it exists elsewhere only in the schema's .json file? Since I think it's testing the merge, I would accept as a compromise that the string is the same as the string in the thing it's merging from... In fact, I'm a little surprised that you're not just testing that the tree matches that other tree. At a previous employer, I had a testing routine (and I think unittest has a similar one built into it as a .assertxxx operation) that checks that a given dictionary has at least the parts given by another given dictionary (ignoring additional other things that might have been inserted).

""" Tests admins can do various actions, including purging items """

@staticmethod
def test_admin_can_purge(testapp, fastq_format):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there not also be a test_non_admin_cant_purge?

@willronchetti willronchetti merged commit 96734ac into main Aug 8, 2023
2 checks passed
@willronchetti willronchetti deleted the wrr_schema branch August 8, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants