tests.providers.test_person

Module Contents

Classes

TestAr

Tests person in the ar locale

TestAzAz

Tests for az_AZ locale person provider

TestNlBE

Tests person in the nl-BE locale

TestJaJP

Tests person in the ja_JP locale

TestNeNP

A class whose instances are single test cases.

TestFrBE

Tests person in the fr-BE locale

TestFiFI

A class whose instances are single test cases.

TestSvSE

A class whose instances are single test cases.

TestPlPL

A class whose instances are single test cases.

TestCsCZ

A class whose instances are single test cases.

TestThTh

Tests person in the th_TH locale

TestZhCN

A class whose instances are single test cases.

TestZhTW

A class whose instances are single test cases.

TestHyAM

Tests person in the hy_AM locale

TestTaIN

A class whose instances are single test cases.

TestRuRU

Tests person in the ru_RU locale

TestEs

Tests person in the es locale.

TestEsCO

Tests person in the es_CO locale

TestHeIL

Tests person in the he_IL locale.

TestPtPt

Tests person in the pt_PT locale.

TestEnGB

A class whose instances are single test cases.

TestUs

Tests person in the en_US locale

TestEn

Tests person in the en locale

TestOrIN

A class whose instances are single test cases.

TestEnIN

Tests person in the en_IN locale

TestEnIE

Tests person in the en-IE locale

TestGaIE

Tests person in the ga-IE locale

TestZuZa

A class whose instances are single test cases.

class tests.providers.test_person.TestAr(methodName='runTest')

Bases: unittest.TestCase

Tests person in the ar locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name()
test_last_name()
class tests.providers.test_person.TestAzAz(methodName='runTest')

Bases: unittest.TestCase

Tests for az_AZ locale person provider

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name()
test_last_name()
class tests.providers.test_person.TestNlBE(methodName='runTest')

Bases: unittest.TestCase

Tests person in the nl-BE locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name()
test_last_name()
class tests.providers.test_person.TestJaJP(methodName='runTest')

Bases: unittest.TestCase

Tests person in the ja_JP locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_person()
class tests.providers.test_person.TestNeNP(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_names()
class tests.providers.test_person.TestFrBE(methodName='runTest')

Bases: unittest.TestCase

Tests person in the fr-BE locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name()
test_last_name()
class tests.providers.test_person.TestFiFI(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_gender_first_names()
test_last_names()
class tests.providers.test_person.TestSvSE(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_gender_first_names()

simple test to verify that we are pulling gender specific names

class tests.providers.test_person.TestPlPL(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_identity_card_number_checksum()
test_identity_card_number()
test_pesel_birth_date(mock_random_digit)
test_pesel_sex_male(mock_random_digit)
test_pesel_sex_female(mock_random_digit)
test_pesel_value_error()
test_pwz_doctor(mock_random_digit)
test_pwz_doctor_check_digit_zero(mock_random_digit)
test_pwz_nurse(mock_random_digit, mock_random_int)
static validate_nip(nip_str)

Validates NIP using recommended code https://pl.wikibooks.org/wiki/Kody_%C5%BAr%C3%B3d%C5%82owe/Implementacja_NIP

test_nip()
class tests.providers.test_person.TestCsCZ(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_name_male()
test_name_female()
class tests.providers.test_person.TestThTh(methodName='runTest')

Bases: unittest.TestCase

Tests person in the th_TH locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name()
test_last_name()
test_name()
class tests.providers.test_person.TestZhCN(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_last_name()
test_first_name()
test_name()
class tests.providers.test_person.TestZhTW(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_last_name()
test_first_name()
test_name()
class tests.providers.test_person.TestHyAM(methodName='runTest')

Bases: unittest.TestCase

Tests person in the hy_AM locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_name()
test_first_name()
test_last_name()
class tests.providers.test_person.TestTaIN(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_gender_first_names()

simple test to verify that we are pulling gender specific names

class tests.providers.test_person.TestRuRU(methodName='runTest')

Bases: unittest.TestCase

Tests person in the ru_RU locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_translit()
test_name_female()
test_name_male()
test_language_name()
class tests.providers.test_person.TestEs(methodName='runTest')

Bases: unittest.TestCase

Tests person in the es locale.

setUp()

Hook method for setting up the test fixture before exercising it.

test_language_name()
class tests.providers.test_person.TestEsCO(methodName='runTest')

Bases: unittest.TestCase

Tests person in the es_CO locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_names()
test_last_names()
test_prefix()
class tests.providers.test_person.TestHeIL(methodName='runTest')

Bases: unittest.TestCase

Tests person in the he_IL locale.

setUp()

Hook method for setting up the test fixture before exercising it.

test_language_name()
test_male_first_name()
test_female_first_name()
test_last_name()
class tests.providers.test_person.TestPtPt(methodName='runTest')

Bases: unittest.TestCase

Tests person in the pt_PT locale.

setUp()

Hook method for setting up the test fixture before exercising it.

test_male_first_name()
test_female_first_name()
test_last_name()
class tests.providers.test_person.TestEnGB(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name_female()
test_first_name_male()
test_name_female()
test_name_male()
get_first_name_from_full_name(full_name)
class tests.providers.test_person.TestUs(methodName='runTest')

Bases: unittest.TestCase

Tests person in the en_US locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_names()
test_last_names()
test_prefix()
test_suffix()
class tests.providers.test_person.TestEn(methodName='runTest')

Bases: unittest.TestCase

Tests person in the en locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_suffix()
class tests.providers.test_person.TestOrIN(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_names()

simple test to verify that we are pulling gender specific names

test_middle_names()

test the middle name

test_last_names()

test the last name is generating from the provided tuple

class tests.providers.test_person.TestEnIN(methodName='runTest')

Bases: unittest.TestCase

Tests person in the en_IN locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name()
test_last_name()
class tests.providers.test_person.TestEnIE(methodName='runTest')

Bases: unittest.TestCase

Tests person in the en-IE locale

setUp()

Hook method for setting up the test fixture before exercising it.

test_first_name()
test_last_name()
class tests.providers.test_person.TestGaIE(methodName='runTest')

Bases: TestEnIE

Tests person in the ga-IE locale

setUp()

Hook method for setting up the test fixture before exercising it.

class tests.providers.test_person.TestZuZa(methodName='runTest')

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

setUp()

Hook method for setting up the test fixture before exercising it.

test_last_name()

Test the generation of Zulu last names.

test_first_name()

Test the generation of Zulu first names.

test_full_name()

Test the generation of full Zulu names.