def test_application_with_all_values(): app = create_test_application() result = transform_okta_application(app) expected = { 'id': app['id'], 'name': app['name'], 'label': app['label'], 'created': '01/01/2019, 00:00:01', 'okta_last_updated': '01/01/2019, 00:00:01', 'status': app['status'], 'activated': '01/01/2019, 00:00:01', 'features': app['features'], 'sign_on_mode': app['signOnMode'], } assert result == expected
def test_application_with_activated_none(): app = create_test_application() app["activated"] = None result = transform_okta_application(app) expected = { 'id': app["id"], 'name': app["name"], 'label': app["label"], 'created': '01/01/2019, 00:00:01', 'okta_last_updated': '01/01/2019, 00:00:01', 'status': app["status"], 'activated': None, 'features': app["features"], 'sign_on_mode': app["signOnMode"], } assert result == expected
def test_application_with_activated_none(): app = create_test_application() app.activated = None result = transform_okta_application(app) expected = { 'id': app.id, 'name': app.name, 'label': app.label, 'created': '01/01/2019, 00:00:01', 'okta_last_updated': '01/01/2019, 00:00:01', 'status': app.status, 'activated': None, 'features': app.features, 'sign_on_mode': app.signOnMode, } assert result == expected