def test_set_good_entry_filter(self, good_entry_filter): d = DailyFilings(date=date(2020, 1, 2)) d.entry_filter = good_entry_filter assert callable(d.entry_filter)
def test_set_good_entry_filter(self, good_entry_filter, mock_user_agent): d = DailyFilings(date=date(2020, 1, 2), user_agent=mock_user_agent) d.entry_filter = good_entry_filter assert callable(d.entry_filter)
def test_set_bad_entry_filter(self, bad_entry_filter): with pytest.raises(ValueError): d = DailyFilings(date=date(2020, 1, 2)) d.entry_filter = bad_entry_filter
def test_set_bad_entry_filter(self, bad_entry_filter, mock_user_agent): with pytest.raises(ValueError): d = DailyFilings(date=date(2020, 1, 2), user_agent=mock_user_agent) d.entry_filter = bad_entry_filter