示例#1
0
def generate_organization(session, **kwargs):
    org = create_organization(
        name='Company+{}'.format(uuid.uuid4()),
        session=session,
        **kwargs
    )
    return org
示例#2
0
    def test_create_organization(self):
        self.assertIsNone(self.session.query(Organization).first())

        org = create_organization(
            name='Plangrid',
            session=self.session
        )

        self.assertEqual(org.name, 'Plangrid')
        self.assertEqual(org.auth_type, 'google')
        self.assertIsNotNone(self.session.query(Organization).first())