diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix
index d89717a0a76f93bb6062ad63c6cfdbb91c12c746..6ed4b733bffad29fbc52a492e295bc5ee7dddbe2 100644
--- a/nixos/lib/testing.nix
+++ b/nixos/lib/testing.nix
@@ -14,7 +14,8 @@
     ''
     # The driver runs pyflakes on this script before letting it
     # run... Convince pyflakes that there is a `test` name.
-    test = None
+    def test():
+        pass
     with open("${testpath}") as testfile:
         exec(testfile.read(), globals())
     # For simple types, JSON is compatible with Python syntax!