| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -197,21 +197,30 @@ def test_valid_data(m_open, path_exists): | |||
| 197 | 197 | @mock.patch("os.path.exists") | |
| 198 | 198 | @mock.patch("builtins.open") | |
| 199 | 199 | def test_data_from_helper(m_open, path_exists, tmp_path): | |
| 200 | - helper = (tmp_path / "helper.sh") | ||
| 201 | - helper.write_text(dedent("""\ | ||
| 202 | - #!/bin/sh | ||
| 203 | - echo "secret" | ||
| 204 | - """)) | ||
| 200 | + helper = tmp_path / "helper.sh" | ||
| 201 | + helper.write_text( | ||
| 202 | + dedent( | ||
| 203 | + """\ | ||
| 204 | + #!/bin/sh | ||
| 205 | + echo "secret" | ||
| 206 | + """ | ||
| 207 | + ) | ||
| 208 | + ) | ||
| 205 | 209 | helper.chmod(0o755) | |
| 206 | 210 | ||
| 207 | - fd = io.StringIO(dedent("""\ | ||
| 208 | - [global] | ||
| 209 | - default = helper | ||
| 210 | - | ||
| 211 | - [helper] | ||
| 212 | - url = https://helper.url | ||
| 213 | - oauth_token = helper: %s | ||
| 214 | - """) % helper) | ||
| 211 | + fd = io.StringIO( | ||
| 212 | + dedent( | ||
| 213 | + """\ | ||
| 214 | + [global] | ||
| 215 | + default = helper | ||
| 216 | + | ||
| 217 | + [helper] | ||
| 218 | + url = https://helper.url | ||
| 219 | + oauth_token = helper: %s | ||
| 220 | + """ | ||
| 221 | + ) | ||
| 222 | + % helper | ||
| 223 | + ) | ||
| 215 | 224 | ||
| 216 | 225 | fd.close = mock.Mock(return_value=None) | |
| 217 | 226 | m_open.return_value = fd | |
| Back | FazBrowse Home | New Git URL |
0 commit comments