Skip to content

Conversation

@rerb
Copy link
Contributor

@rerb rerb commented Feb 12, 2017

No description provided.

rerb added 2 commits February 11, 2017 19:03
Replaced by getting primary organization for an Individual, then the
"first" membership for that organization, where "first" means the
first one that comes back when we query MemberSuite for the list of
all memberships for an organization (in memberships.services).
@coveralls
Copy link

coveralls commented Feb 12, 2017

Coverage Status

Coverage decreased (-3.8%) to 88.805% when pulling 67bedd8 on is-member into 52cb293 on master.

@coveralls
Copy link

coveralls commented Feb 12, 2017

Coverage Status

Coverage decreased (-4.1%) to 88.533% when pulling b51239c on is-member into 52cb293 on master.

# |
# |
# V
test_org_id = "6faf90e4-0007-c9dc-98b7-0b3c53985743"
Copy link
Contributor

Choose a reason for hiding this comment

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

These are actually different: '6faf90e4-0074-cbb5-c1d2-0b3c539859ef' != "6faf90e4-0007-c9dc-98b7-0b3c53985743"

The first is for some org that had a membership, the second is "AASHE Test Campus" that does not. We would of course change these if we ever get a sandbox set up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The comment below (Test org with a membership) makes it look like '6faf90e4-0007-c578-8310-0b3c53985743' is for an org with memberships, too. Not so?

        # Test org with a membership
        test_org_id = "6faf90e4-0007-c578-8310-0b3c53985743"
        membership_list = self.service.get_memberships_for_org(test_org_id)
        self.assertEqual(type(membership_list[0]), Membership)
        self.assertEqual(membership_list[0].id,
                         '6faf90e4-0074-cbb5-c1d2-0b3c539859ef')

        # Test org without a membership
        test_org_id = "6faf90e4-0007-c9dc-98b7-0b3c53985743"

Copy link
Contributor

Choose a reason for hiding this comment

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

Line 36 tries querying memberships for "6faf90e4-0007-c9dc-98b7-0b3c53985743", but should return an empty list.

I think MemberSuite's ID system is confusing, here. IDs for all objects have the same format.

"6faf90e4-0007-c578-8310-0b3c53985743" is an organization that does have an associated membership.
'6faf90e4-0074-cbb5-c1d2-0b3c539859ef' is that associated membership.
"6faf90e4-0007-c9dc-98b7-0b3c53985743" is another organization that does NOT have a memebrship, so the lines below it test that calling "get_memberships_for_org()" returns an empty result list.

@rerb
Copy link
Contributor Author

rerb commented Feb 13, 2017 via email

@baronvonvaderham
Copy link
Contributor

Oh that test is actually failing now. It looks like someone added a membership to that for some reason, probably Jessica or someone doing training on the system. All the more reason we need a sandbox I guess.

I'm updating the ID in a commit I'll be pushing to master soon (it's just a couple minor tweaks I need for ISS work).

@coveralls
Copy link

coveralls commented Feb 17, 2017

Coverage Status

Coverage decreased (-0.5%) to 92.157% when pulling 99971b2 on is-member into 6e05e96 on master.

@rerb rerb merged commit 80532e4 into master Feb 17, 2017
@rerb rerb deleted the is-member branch February 17, 2017 17:26
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