def generate_organization(session, **kwargs): org = create_organization( name='Company+{}'.format(uuid.uuid4()), session=session, **kwargs ) return org
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())