def test_extract_hash_name_from_duns():
    """ Testing extracting the hash/name from a DUNS """
    example_duns = "000000001"
    expected_hash = "00077a9a-5a70-8919-fd19-330762af6b84"
    expected_name = "PARENT RECIPIENT"
    mommy.make("recipient.RecipientLookup", **TEST_RECIPIENT_LOOKUPS[expected_hash])

    recipient_hash, recipient_name = recipients.extract_hash_name_from_duns(example_duns)
    assert UUID(expected_hash) == recipient_hash
    assert expected_name == recipient_name
def test_extract_hash_name_from_duns():
    """ Testing extracting the hash/name from a DUNS """
    example_duns = '000000001'
    expected_hash = '00077a9a-5a70-8919-fd19-330762af6b84'
    expected_name = 'PARENT RECIPIENT'
    mommy.make(RecipientLookup, **TEST_RECIPIENT_LOOKUPS[expected_hash])

    recipient_hash, recipient_name = recipients.extract_hash_name_from_duns(example_duns)
    assert UUID(expected_hash) == recipient_hash
    assert expected_name == recipient_name