(self)
| 591 | self.org.invite_user(email="foo@example.com", role="billing_manager", teams=[team]) |
| 592 | |
| 593 | def testInviteUserAsNonOwner(self): |
| 594 | with self.assertRaises(github.GithubException) as raisedexp: |
| 595 | self.org.invite_user(email="bar@example.com") |
| 596 | self.assertEqual( |
| 597 | raisedexp.exception.message, "You must be an admin to create an invitation to an organization." |
| 598 | ) |
| 599 | self.assertEqual(raisedexp.exception.status, 403) |
| 600 | self.assertEqual( |
| 601 | raisedexp.exception.data, |
| 602 | { |
| 603 | "documentation_url": "https://developer.github.com/v3/orgs/members/#create-organization-invitation", |
| 604 | "message": "You must be an admin to create an invitation to an organization.", |
| 605 | }, |
| 606 | ) |
| 607 | |
| 608 | def testCreateMigration(self): |
| 609 | self.org = self.g.get_organization("sample-test-organisation") |
nothing calls this directly
no test coverage detected