def test_purge_nulls():
    service_with_nulls = {
        'serviceName': 'Service with nulls',
        'empty': None,
        'serviceSummary': None,
        'price': 'Not a lot'
    }
    same_service_without_nulls = {
        'serviceName': 'Service with nulls',
        'price': 'Not a lot'
    }
    assert_equal(purge_nulls_from_data(service_with_nulls), same_service_without_nulls)
Example #2
0
def test_purge_nulls():
    service_with_nulls = {
        'serviceName': 'Service with nulls',
        'empty': None,
        'serviceSummary': None,
        'price': 'Not a lot'
    }
    same_service_without_nulls = {
        'serviceName': 'Service with nulls',
        'price': 'Not a lot'
    }
    assert purge_nulls_from_data(
        service_with_nulls) == same_service_without_nulls