[#1234] Merge remote-tracking branch 'remotes/upstream/develop' into 1234-mastodon...
[akkoma] / test / test_helper.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 os_exclude = if :os.type() == {:unix, :darwin}, do: [skip_on_mac: true], else: []
6 ExUnit.start(exclude: os_exclude)
7 Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, :manual)
8 Mox.defmock(Pleroma.ReverseProxy.ClientMock, for: Pleroma.ReverseProxy.Client)
9 {:ok, _} = Application.ensure_all_started(:ex_machina)
10
11 ExUnit.after_suite(fn _results ->
12 uploads = Pleroma.Config.get([Pleroma.Uploaders.Local, :uploads], "test/uploads")
13 File.rm_rf!(uploads)
14 end)