def test_parse_recipients_lower_case_groups(): res = list( parser.parse_recipients([ ['Email', 'Active'], ['*****@*****.**', 'X'], ])) assert res[0].groups == ('active', )
def test_parse_recipients_skip_empty_groups(): res = list( parser.parse_recipients([ ['Email', 'Active'], ['*****@*****.**', ''], ])) assert res[0].groups == ()
def test_parse_recipients_case_insensitive_highlights(): res = list( parser.parse_recipients([ ['Email', 'Highlight'], ['*****@*****.**', 'Hi'], ])) assert res[0].highlights == ('Hi', )
def test_parse_recipients_skip_empty_highlights(): res = list( parser.parse_recipients([ ['Email', 'Highlight'], ['*****@*****.**', ''], ])) assert res[0].highlights == ()
def test_parse_recipients_returns_list_of_recipients_no_default_values(): res = parser.parse_recipients([ ['Email'], ['*****@*****.**'], ]) for recipient in res: assert isinstance(recipient, Recipient) assert recipient.groups == () assert recipient.highlights == ()
def test_parse_recipients_returns_list_of_recipients_no_default_values(): res = parser.parse_recipients([ ['Email'], ['*****@*****.**'], ]) for recipient in res: assert isinstance(recipient, Recipient) assert recipient.groups == () assert recipient.highlights == ()
def test_parse_recipients_skips_empty_emails(): assert not list(parser.parse_recipients([ ['Email'], [''], ]))
def test_parse_recipients_returns_empty_if_none(): assert not list(parser.parse_recipients(None))
def test_parse_recipients_skips_empty_rows(): assert not list(parser.parse_recipients([ ['Email'], [], ]))
def test_parse_recipients_returns_empty_if_none(): assert not list(parser.parse_recipients(None))
def test_parse_recipients_skip_empty_groups(): res = list(parser.parse_recipients([ ['Email', 'Active'], ['*****@*****.**', ''], ])) assert res[0].groups == ()
def test_parse_recipients_lower_case_groups(): res = list(parser.parse_recipients([ ['Email', 'Active'], ['*****@*****.**', 'X'], ])) assert res[0].groups == ('active',)
def test_parse_recipients_skip_empty_highlights(): res = list(parser.parse_recipients([ ['Email', 'Highlight'], ['*****@*****.**', ''], ])) assert res[0].highlights == ()
def test_parse_recipients_case_insensitive_highlights(): res = list(parser.parse_recipients([ ['Email', 'Highlight'], ['*****@*****.**', 'Hi'], ])) assert res[0].highlights == ('Hi',)