Example #1
0
def test_extract_name_duns_from_hash():
    """ Testing extracting name and duns from the recipient hash """
    recipient_hash = "00077a9a-5a70-8919-fd19-330762af6b84"
    mommy.make("recipient.RecipientLookup", **TEST_RECIPIENT_LOOKUPS[recipient_hash])

    expected_name = TEST_RECIPIENT_LOOKUPS[recipient_hash]["legal_business_name"]
    expected_duns = TEST_RECIPIENT_LOOKUPS[recipient_hash]["duns"]
    duns, name = recipients.extract_name_duns_from_hash(recipient_hash)
    assert duns == expected_duns
    assert name == expected_name
def test_extract_name_duns_from_hash():
    """ Testing extracting name and duns from the recipient hash """
    recipient_hash = '00077a9a-5a70-8919-fd19-330762af6b84'
    mommy.make(RecipientLookup, **TEST_RECIPIENT_LOOKUPS[recipient_hash])

    expected_name = TEST_RECIPIENT_LOOKUPS[recipient_hash]['legal_business_name']
    expected_duns = TEST_RECIPIENT_LOOKUPS[recipient_hash]['duns']
    duns, name = recipients.extract_name_duns_from_hash(recipient_hash)
    assert duns == expected_duns
    assert name == expected_name