Skip to content

Conversation

@baronvonvaderham
Copy link
Contributor

Ported organization stuff over to this branch as well to avoid complicated merge sequences.

  • Added Organization and OrganizationType models.
  • Added OrganizationService with get_orgs method (previously Client.query_orgs), get_org_types, and associated packaging methods.
  • Did same for Memberships
  • Altered recursive querying to be able to control pagination and recursion depth from the tests so we can test "get_all" type methods without having to actually get "all" stuff.

Added memberships submodule. Created MembershipService and associated methods.

Created initial Membership model, will expand after tests are created and I can see exactly what's in the objects returned from MemberSuite.
Working version of memberships models and methods. Test passing.

Needs to figure out a sane test for get_all_memberships() that doesn't require
pulling all 942+ memberships (a number that will change once data goes live).
May have to wait until we have a sandbox created that has unchanging data.

@todo - Add tests for membership products.
Fixed MembershipProducts model and related methods in services.

Added tests for that, and figured out a test for the get_all_memberships() method.
Removed rogue file where I was dumping a test object from a MS response.

Added iniitial org stuff before I noticed that.
Added parameters limit_to, depth, and max_depth to get_all_memberships().

This allows tests to specify 1 result per iteration, and limit the number of iterations.

Depth tracks the current iteration count. Added a check to compare depth to max_depth to decide if it should recur again.
Added test to make sure we're getting proper Membership objects.

Required modifying get_all_memberships() to call the package method
before concatenation...if it was called in the return statement as
usual it broke due to recursion (tried packaging parts of the results
that were already converted).
Added Organization Service and associated tests.

Just need to flesh out Organization model more and we're done!
Apparently the possible organization types have changed since last I worked on this.

As such, decided to abstract that to a metadata class of its own rather than doing a local dict matching.

Expanded Organization attributes to match what is needed in the ISS.
Our other tests call this incidentally because we're constantly converting objects and pulling session IDs.
@baronvonvaderham
Copy link
Contributor Author

Some login tests are failing on earlier versions of django, but that's also true in the master branch at the moment. Unless you guys see something weird, I think this is ready to merge.

@coveralls
Copy link

coveralls commented Feb 9, 2017

Coverage Status

Coverage increased (+0.1%) to 95.433% when pulling 106927a on memberships into 25b305a on master.

@coveralls
Copy link

coveralls commented Feb 9, 2017

Coverage Status

Coverage increased (+0.1%) to 95.433% when pulling c35bd81 on memberships into 25b305a on master.

@rerb rerb merged commit a026a46 into master Feb 9, 2017
@rerb rerb deleted the memberships branch April 14, 2017 05:34
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.

5 participants