More tests (2).
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 4 Apr 2018 07:34:51 +0000 (16:34 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 4 Apr 2018 07:34:51 +0000 (16:34 +0900)
tests/kdf_calc.py [new symlink]
tests/test_007_kdf.py [deleted file]
tests/test_007_kdf_full.py [new file with mode: 0644]

diff --git a/tests/kdf_calc.py b/tests/kdf_calc.py
new file mode 120000 (symlink)
index 0000000..e0ae7fb
--- /dev/null
@@ -0,0 +1 @@
+../tool/kdf_calc.py
\ No newline at end of file
diff --git a/tests/test_007_kdf.py b/tests/test_007_kdf.py
deleted file mode 100644 (file)
index e587c82..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-test_007_kdf.py - test KDF data object
-
-Copyright (C) 2018  g10 Code GmbH
-Author: NIIBE Yutaka <gniibe@fsij.org>
-
-This file is a part of Gnuk, a GnuPG USB Token implementation.
-
-Gnuk is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Gnuk is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
-License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-"""
-
-from card_const import *
-from constants_for_test import *
-
-def test_verify_pw3_0(card):
-    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
-    assert v
-
-def test_kdf_put_full(card):
-    r = card.cmd_put_data(0x00, 0xf9, KDF_FULL)
-    if r:
-        card.configure_with_kdf()
-    assert r
-
-def test_verify_pw3_1(card):
-    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
-    assert v
-
-def test_kdf_put_single(card):
-    r = card.cmd_put_data(0x00, 0xf9, KDF_SINGLE)
-    if r:
-        card.configure_with_kdf()
-    assert r
-
-def test_verify_pw3_2(card):
-    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
-    assert v
-
-def test_kdf_put_none(card):
-    r = card.cmd_put_data(0x00, 0xf9, b"")
-    if r:
-        card.configure_with_kdf()
-    assert r
-
-def test_verify_pw3_3(card):
-    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
-    assert v
diff --git a/tests/test_007_kdf_full.py b/tests/test_007_kdf_full.py
new file mode 100644 (file)
index 0000000..e587c82
--- /dev/null
@@ -0,0 +1,58 @@
+"""
+test_007_kdf.py - test KDF data object
+
+Copyright (C) 2018  g10 Code GmbH
+Author: NIIBE Yutaka <gniibe@fsij.org>
+
+This file is a part of Gnuk, a GnuPG USB Token implementation.
+
+Gnuk is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Gnuk is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from card_const import *
+from constants_for_test import *
+
+def test_verify_pw3_0(card):
+    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
+    assert v
+
+def test_kdf_put_full(card):
+    r = card.cmd_put_data(0x00, 0xf9, KDF_FULL)
+    if r:
+        card.configure_with_kdf()
+    assert r
+
+def test_verify_pw3_1(card):
+    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
+    assert v
+
+def test_kdf_put_single(card):
+    r = card.cmd_put_data(0x00, 0xf9, KDF_SINGLE)
+    if r:
+        card.configure_with_kdf()
+    assert r
+
+def test_verify_pw3_2(card):
+    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
+    assert v
+
+def test_kdf_put_none(card):
+    r = card.cmd_put_data(0x00, 0xf9, b"")
+    if r:
+        card.configure_with_kdf()
+    assert r
+
+def test_verify_pw3_3(card):
+    v = card.verify(3, FACTORY_PASSPHRASE_PW3)
+    assert v