Browse Source

fixed tests for fixed svn add

pull/1/head
Ansible Deploy 3 years ago
parent
commit
61150fdf7e
  1. 2
      elab_users/users.py
  2. 8
      tests/test_elab_users_users.py

2
elab_users/users.py

@ -71,8 +71,6 @@ class ElabUser:
out_file = tmpdir / filename out_file = tmpdir / filename
handler.check_call(["cp", str(in_file), str(out_file)]) handler.check_call(["cp", str(in_file), str(out_file)])
# add and commit the changes # add and commit the changes
print(tmpdir)
print(list(tmpdir.iterdir()))
handler.check_call( handler.check_call(
["svn", "add", "--force", str(tmpdir) + "/"] # noqa: S604 ["svn", "add", "--force", str(tmpdir) + "/"] # noqa: S604
) )

8
tests/test_elab_users_users.py

@ -93,10 +93,10 @@ def test_elabuser_create_new_repo(stub_handler):
called = stub_handler.stack[-2] called = stub_handler.stack[-2]
assert called.func == "check_call" assert called.func == "check_call"
assert called.args[:2] == ["svn", "add"] assert called.args[:3] == ["svn", "add", "--force"]
assert called.args[2].startswith("/tmp/") # noqa: S108 assert called.args[3].startswith("/tmp/") # noqa: S108
assert called.args[2].endswith("/*") assert called.args[3].endswith("/")
assert called.kargs == {"shell": True} assert called.kargs == {}
called = stub_handler.stack[-1] called = stub_handler.stack[-1]
assert called.func == "check_call" assert called.func == "check_call"

Loading…
Cancel
Save