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

cleaned up test data #123

Merged
merged 1 commit into from
Apr 1, 2016
Merged

cleaned up test data #123

merged 1 commit into from
Apr 1, 2016

Conversation

linzjax
Copy link
Contributor

@linzjax linzjax commented Apr 1, 2016

Adding single sets of data is not perfect, but it works. Let me know if this fixes all the pep8 stuff, I don't really trust my linter...

@ian-ross ian-ross force-pushed the testing/test-data branch from 2d770b6 to 7d0e56f Compare April 1, 2016 17:34
users[4].assign_policies(roles['habitat-for-humanity-oa'], roles['cadasta-oa'])
users[4].assign_policies(roles['habitat-for-humanity-oa'],
roles['cadasta-oa'])

Copy link
Contributor

Choose a reason for hiding this comment

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

Here, you should try using the new OrganizationRole model to set up the roles for organization admins. You can see how it works in organization/models.py. Look in particular at the get_policy_instance function and anywhere you see the OrganizationRole class being used. It might take a bit of experimentation, but if you set things up right, it ought to be possible to make users organization administrators just by creating the appropriate OrganizationRole objects. In fact, if you take a look in the latest version of my test-data/test-data-setup.py script, right at the bottom, you'll see the simplest possible way to do it. (I'm going to merge this anyway, since it otherwise is probably fine, and we'll find problems with it quickly enough once we start using it more.)

@ian-ross ian-ross merged commit 6e47ad2 into master Apr 1, 2016
@ian-ross ian-ross deleted the testing/test-data branch April 1, 2016 17:50
@linzjax linzjax mentioned this pull request Feb 24, 2017
14 tasks
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.

3 participants