Example #1
0
def test_setters():
    p = Provider('*****@*****.**', '1234', 'McTester', 'Test', '124024114',
                 'Official Tester')

    p.email = '*****@*****.**'
    info = p.get_information()
    assert (info['email'] == '*****@*****.**')

    p.password = '******'
    info = p.get_information()
    assert (info['password'] != 'wooowthatsgreat'
            and info['password'] == 'WoooWThatsGreat')

    p.surname = 'MCTESTing'
    info = p.get_information()
    assert (info['surname'] == 'mctesting')

    p.given_name = 'TEEEESt'
    info = p.get_information()
    assert (info['given_name'] == 'teeeest')

    p.provider_no = '123123'
    info = p.get_information()
    assert (info['provider_no'] == '123123')

    p.service = 'OFFicial TESTer'
    info = p.get_information()
    assert (info['service'] == 'official tester')