def test_id_card(self):
        value = self.sd.id_card(locale='es')
        self.assertTrue(isinstance(value, six.string_types))
        self.assertEqual(len(value), 9)
        self.assertTrue(value[8] in "TRWAGMYFPDXBNJZSQVHLCKET")

        with self.assertRaises(ParameterError):
            value = self.sd.id_card(locale="not-valid-locale")
dataset/ETHPy150Open kaleidos/django-sampledatahelper/tests/tests.py/TestLocalizedHelpers.test_id_card/original