| 104 | |
| 105 | |
| 106 | def test_multi_alias(tmp_path: Path): |
| 107 | calls = _calls(tmp_path, { |
| 108 | "lib/app/accounts.ex": _ACCOUNTS, |
| 109 | "lib/app/repo.ex": _REPO, |
| 110 | "lib/app/web.ex": _module("App.Web", ( |
| 111 | " alias App.{Accounts, Repo}\n" |
| 112 | "\n" |
| 113 | " def show(id) do\n" |
| 114 | " Accounts.get_user(id)\n" |
| 115 | " end\n" |
| 116 | "\n" |
| 117 | " def save(x) do\n" |
| 118 | " Repo.insert(x)\n" |
| 119 | " end\n" |
| 120 | )), |
| 121 | }) |
| 122 | assert calls.get(("App.Web.show", "App.Accounts.get_user")) == "EXTRACTED" |
| 123 | assert calls.get(("App.Web.save", "App.Repo.insert")) == "EXTRACTED" |
| 124 | |
| 125 | |
| 126 | def test_dunder_module(tmp_path: Path): |