def test_copy_custom_data(self): migrator = ApplicationMigrator(destination_client=self.dst, source_application=self.app) copied_app = migrator.copy_app() copied_data = migrator.copy_custom_data() self.assertEqual(copied_data['hi'], 'there') copied_app.delete()
def test_copy_oauth_policy(self): migrator = ApplicationMigrator(destination_client=self.dst, source_application=self.app) copied_app = migrator.copy_app() copied_policy = migrator.copy_oauth_policy() self.assertEqual(copied_policy.access_token_ttl, timedelta(hours=2)) self.assertEqual(copied_policy.refresh_token_ttl, timedelta(hours=24)) copied_app.delete()
def test_copy_app(self): migrator = ApplicationMigrator(destination_client=self.dst, source_application=self.app) copied_app = migrator.copy_app() self.assertEqual(copied_app.description, self.app.description) self.assertEqual(copied_app.name, self.app.name) self.assertEqual(copied_app.status, self.app.status) copied_app.delete()