# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ConnCase do
@endpoint Pleroma.Web.Endpoint
# Sets up OAuth access with specified scopes
- defp oauth_access(scopes, opts \\ %{}) do
+ defp oauth_access(scopes, opts \\ []) do
user =
- Map.get_lazy(opts, :user, fn ->
+ Keyword.get_lazy(opts, :user, fn ->
Pleroma.Factory.insert(:user)
end)
token =
- Map.get_lazy(opts, :oauth_token, fn ->
+ Keyword.get_lazy(opts, :oauth_token, fn ->
Pleroma.Factory.insert(:oauth_token, user: user, scopes: scopes)
end)