about summary refs log tree commit diff
path: root/nixos/tests/tor.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/tor.nix')
-rw-r--r--nixos/tests/tor.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/tests/tor.nix b/nixos/tests/tor.nix
index 0cb44ddff248..ad07231557c3 100644
--- a/nixos/tests/tor.nix
+++ b/nixos/tests/tor.nix
@@ -1,4 +1,4 @@
-import ./make-test.nix ({ lib, ... }: with lib;
+import ./make-test-python.nix ({ lib, ... }: with lib;
 
 rec {
   name = "tor";
@@ -21,8 +21,10 @@ rec {
     };
 
   testScript = ''
-    $client->waitForUnit("tor.service");
-    $client->waitForOpenPort(9051);
-    $client->succeed("echo GETINFO version | nc 127.0.0.1 9051") =~ /514 Authentication required./ or die;
+    client.wait_for_unit("tor.service")
+    client.wait_for_open_port(9051)
+    assert "514 Authentication required." in client.succeed(
+        "echo GETINFO version | nc 127.0.0.1 9051"
+    )
   '';
 })