<reponame>Jesse-Yung/jsonclasses<filename>tests/test_salt.py
from __future__ import annotations
from unittest import TestCase
from tests.classes.super_str import SuperStr
from bcrypt import checkpw


class TestSalt(TestCase):

    def test_salt_add_salt_to_a_string(self):
        ss = SuperStr(password='<PASSWORD>')
        self.assertNotEqual(ss.password, '<PASSWORD>')
        self.assertTrue(checkpw('123456'.encode(), ss.password.encode()))

from __future__ import annotations
from unittest import TestCase
from tests.classes.super_str import SuperStr
from bcrypt import checkpw


class TestSalt(TestCase):

    def test_salt_add_salt_to_a_string(self):
        ss = SuperStr(password='<PASSWORD>')
        self.assertNotEqual(ss.password, '<PASSWORD>')
        self.assertTrue(checkpw('123456'.encode(), ss.password.encode()))