Skip to content

Commit

Permalink
Remove some patched out tests that don't apply anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Jan 29, 2025
1 parent 743c9f9 commit b1cedc4
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions tests/unit/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,6 @@ def test_local_dir_image_name(repo_with_content):
)


def test_build_kwargs(repo_with_content):
upstream, sha1 = repo_with_content
argv = [upstream]
app = make_r2d(argv)
app.extra_build_kwargs = {"somekey": "somevalue"}

with patch.object(docker.APIClient, "build") as builds:
builds.return_value = []
app.build()
builds.assert_called_once()
args, kwargs = builds.call_args
assert "somekey" in kwargs
assert kwargs["somekey"] == "somevalue"


def test_run_kwargs(repo_with_content):
upstream, sha1 = repo_with_content
argv = [upstream]
Expand All @@ -107,25 +92,6 @@ def test_run_kwargs(repo_with_content):
assert kwargs["somekey"] == "somevalue"


def test_root_not_allowed():
with TemporaryDirectory() as src, patch("os.geteuid") as geteuid:
geteuid.return_value = 0
argv = [src]
with pytest.raises(SystemExit) as exc:
app = make_r2d(argv)
assert exc.code == 1

with pytest.raises(ValueError):
app = Repo2Docker(repo=src, run=False)
app.build()

app = Repo2Docker(repo=src, user_id=1000, user_name="jovyan", run=False)
app.initialize()
with patch.object(docker.APIClient, "build") as builds:
builds.return_value = []
app.build()
builds.assert_called_once()


def test_dryrun_works_without_docker(tmpdir, capsys):
with chdir(tmpdir):
Expand Down

0 comments on commit b1cedc4

Please sign in to comment.