Esempio n. 1
0
def test_many_details_2(vcr_live_sleep):
    details = User().profile.details
    sample_details = {
        'income': 'Less than $20,000',
        'monogamy': 'Mostly monogamous',
        'pets': 'Likes dogs and has cats',
        'religion': 'Judaism, and very serious about it',
        'sign': "Pisces, and it's fun to think about",
        'children': "Doesn't have kids, but wants them",
        'drugs': 'Never'
    }
    details.convert_and_update(sample_details)
    vcr_live_sleep(sleep_time)
    for key, value in sorted(sample_details.items()):
        assert getattr(details, key) == value
Esempio n. 2
0
def test_many_details_2(vcr_live_sleep):
    details = User().profile.details
    sample_details = {
        'income': 'Less than $20,000',
        'monogamy': 'Mostly monogamous',
        'pets': 'Likes dogs and has cats',
        'religion': 'Judaism, and very serious about it',
        'sign': "Pisces, and it's fun to think about",
        'children': "Doesn't have kids, but wants them",
        'drugs': 'Never'
    }
    details.convert_and_update(sample_details)
    vcr_live_sleep(sleep_time)
    for key, value in sorted(sample_details.items()):
        assert getattr(details, key) == value
Esempio n. 3
0
def test_many_details(vcr_live_sleep):
    details = User().profile.details
    sample_details = {
        'job': 'technology',
        'diet': 'Strictly Vegetarian',
        'income': 40000,
        'bodytype': 'athletic',
        'orientation': 'bisexual',
        'ethnicities': ['Asian', 'White', 'hispanic', 'black'],
        'smokes': 'when drinking',
        'drugs': 'never',
        'drinks': 'desperately',
        'education': 'Some university',
        'height': '1.52m',
        'religion': 'atheism',
        'sign': 'aries and it matters a lot',
        'status': 'single'
    }

    details.convert_and_update(sample_details)
    vcr_live_sleep(sleep_time)
Esempio n. 4
0
def test_many_details(vcr_live_sleep):
    details = User().profile.details
    sample_details = {
        'job': 'technology',
        'diet': 'Strictly Vegetarian',
        'income': 40000,
        'bodytype': 'athletic',
        'orientation': 'bisexual',
        'ethnicities': ['Asian', 'White', 'hispanic', 'black'],
        'smokes': 'when drinking',
        'drugs': 'never',
        'drinks': 'desperately',
        'education': 'Some university',
        'height': '1.52m',
        'religion': 'atheism',
        'sign': 'aries and it matters a lot',
        'status': 'single'
    }

    details.convert_and_update(sample_details)
    vcr_live_sleep(sleep_time)
Esempio n. 5
0
def test_idempotence_and_convert_and_update_function(vcr_live_sleep):
    details = User().profile.details
    before = details.as_dict
    details.convert_and_update(before)
    vcr_live_sleep(sleep_time)
    assert before == details.as_dict
Esempio n. 6
0
def test_idempotence_and_convert_and_update_function(vcr_live_sleep):
    details = User().profile.details
    before = details.as_dict
    details.convert_and_update(before)
    vcr_live_sleep(sleep_time)
    assert before == details.as_dict