# Path: castellan/common/credentials/password.py
# @property
# def password(self):
#     """This method returns a password."""
#     return self._password
# 
# Path: castellan/tests/base.py
# class TestCase(base.BaseTestCase):
# class CertificateTestCase(TestCase):
# class KeyTestCase(TestCase):
#     def _create_cert(self):
#     def setUp(self):
#     def _create_key(self):
#     def setUp(self):


from castellan.common.credentials import password
from castellan.tests import base
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

"""
Test cases for the password credential
"""



class PasswordTestCase(base.TestCase):

    def _create_password_credential(self):
        return password.Password(self.username,
                                 self.password)

    def setUp(self):
        self.username = "admin"
        self.password = "Pa$$w0rd1"

        self.password_credential = self._create_password_credential()

        super(PasswordTestCase, self).setUp()

    def test_get_username(self):
        self.assertEqual(self.username, self.password_credential.username)

    def test_get_password(self):

# Path: castellan/common/credentials/password.py
# @property
# def password(self):
#     """This method returns a password."""
#     return self._password
# 
# Path: castellan/tests/base.py
# class TestCase(base.BaseTestCase):
# class CertificateTestCase(TestCase):
# class KeyTestCase(TestCase):
#     def _create_cert(self):
#     def setUp(self):
#     def _create_key(self):
#     def setUp(self):


# Path: castellan/tests/unit/credentials/test_password.py
from castellan.common.credentials import password
from castellan.tests import base

#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

"""
Test cases for the password credential
"""



class PasswordTestCase(base.TestCase):

    def _create_password_credential(self):
        return password.Password(self.username,
                                 self.password)

    def setUp(self):
        self.username = "admin"
        self.password = "Pa$$w0rd1"

        self.password_credential = self._create_password_credential()

        super(PasswordTestCase, self).setUp()

    def test_get_username(self):
        self.assertEqual(self.username, self.password_credential.username)

    def test_get_password(self):

        self.assertEqual(self.password, self.password_credential.password)