from ..util import ykman_cli
from .util import PivTestCase, DEFAULT_MANAGEMENT_KEY

class Misc(PivTestCase):

    def test_info(self):
        output = ykman_cli('piv', 'info')
        self.assertIn('PIV version:', output)

    def test_reset(self):
        output = ykman_cli('piv', 'reset', '-f')
        self.assertIn('Success!', output)

    def test_write_read_object(self):
        ykman_cli(
            'piv', 'write-object', '--id',
            '0x5f0001', '-m', DEFAULT_MANAGEMENT_KEY,
            '-', input='test data')
        output = ykman_cli('piv', 'read-object', '--id', '0x5f0001')
        self.assertIn('test data', output)

@@ -613,18 +613,22 @@
 f.assert
-In
+Equals
 ('test d
@@ -630,16 +630,18 @@
 est data
+%5Cn
 ', outpu

use assertEquals in test