]> Nutra Git (v1) - nutratech/cli.git/commitdiff
aaa test package (test order, test_bug depends)
authorShane Jaroch <chown_tee@proton.me>
Sun, 25 Feb 2024 21:46:57 +0000 (16:46 -0500)
committerShane Jaroch <chown_tee@proton.me>
Sun, 25 Feb 2024 21:46:57 +0000 (16:46 -0500)
    it needs the nt.sqlite3 file in place and of the latest version

tests/aaa/__init__.py [new file with mode: 0644]
tests/aaa/test_init.py [new file with mode: 0644]
tests/test_cli.py

diff --git a/tests/aaa/__init__.py b/tests/aaa/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/aaa/test_init.py b/tests/aaa/test_init.py
new file mode 100644 (file)
index 0000000..0b5be14
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+"""
+Created on Sun Feb 25 16:43:56 2024
+
+@author: shane
+
+NOTE: these tests are in a folder "aaa\" which is alphabetically RUN FIRST.
+      Other tests, such as test_bug, depend on having the newer version of nt.sqlite3
+"""
+from ntclient.services import init
+
+
+def test_init():
+    """Tests the SQL/persistence init in real time"""
+    code, result = init(yes=True)
+    assert code == 0
+    assert result
index b07d017991dd11e76a1bb2477e68840eb743518e..3c3e8300f7212c91be795999281c053310b1772f 100644 (file)
@@ -50,12 +50,6 @@ class TestCli(unittest.TestCase):
     @todo: integration tests.. create user, recipe, log.. analyze & compare
     """
 
-    def test_000_init(self):
-        """Tests the SQL/persistence init in real time"""
-        code, result = init(yes=True)
-        assert code == 0
-        assert result
-
     def test_100_usda_sql_funcs(self):
         """Performs cursory inspection (sanity checks) of usda.sqlite3 image"""
         version = usda_ver()