コード例 #1
0
def test_profile_parser_keywords(mock_tokenize_keywords):
    parser = helpers.CompanyParser({'keywords': 'thing,other'})

    parser.keywords

    assert mock_tokenize_keywords.call_count == 1
    assert mock_tokenize_keywords.call_args == mock.call('thing,other')
コード例 #2
0
def test_profile_parser_date_of_creation(value, expected):
    parser = helpers.CompanyParser({'date_of_creation': value})
    assert parser.date_of_creation == expected
コード例 #3
0
def test_profile_parser_(value, expected):
    parser = helpers.CompanyParser(value)

    assert bool(parser) is expected
コード例 #4
0
def test_profile_parser_is_publishable(value, expected):
    parser = helpers.CompanyParser(value)

    assert parser.is_publishable == expected
コード例 #5
0
def test_profile_parser_expertise_products_services_label(value, expected):
    parser = helpers.CompanyParser(value)

    assert parser.expertise_products_services_label == expected
コード例 #6
0
def test_profile_parser_expertise_regions_label(value, expected):
    parser = helpers.CompanyParser(value)

    assert parser.expertise_regions_label == expected
コード例 #7
0
def test_profile_parser_has_expertise(value, expected):
    parser = helpers.CompanyParser(value)

    assert parser.has_expertise is expected
コード例 #8
0
def test_profile_parser_is_in_companies_house(value, expected):
    parser = helpers.CompanyParser({'company_type': value})

    assert parser.is_in_companies_house is expected
コード例 #9
0
def test_profile_parser_employees_label(value, expected):
    parser = helpers.CompanyParser({'employees': value})

    assert parser.employees_label == expected
コード例 #10
0
def test_profile_parser_sectors(value, expected):
    parser = helpers.CompanyParser({'sectors': value})

    assert parser.sectors_label == expected
コード例 #11
0
def test_profile_parser_keywords_joined():
    parser = helpers.CompanyParser({'keywords': 'thing,other'})

    assert parser.keywords == 'thing, other'
コード例 #12
0
def test_profile_parser_keywords_no_keyword(mock_tokenize_keywords, value):
    parser = helpers.CompanyParser({'keywords': value})

    parser.keywords

    assert mock_tokenize_keywords.call_count == 0
コード例 #13
0
def test_profile_parser_address(value, expected):
    parser = helpers.CompanyParser(value)
    assert parser.address == expected