feat: Implement email sending utilities and templates for job notifications
Some checks failed
CI/CD Pipeline / test (push) Failing after 4m9s
Some checks failed
CI/CD Pipeline / test (push) Failing after 4m9s
- Added email_service.py for sending emails with SMTP configuration. - Introduced email_templates.py to render job alert email subjects and bodies. - Enhanced scraper.py to extract contact information from job listings. - Updated settings.js to handle negative keyword input validation. - Created email.html and email_templates.html for managing email subscriptions and templates in the admin interface. - Modified base.html to include links for email alerts and templates. - Expanded user settings.html to allow management of negative keywords. - Updated utils.py to include functions for retrieving negative keywords and email settings. - Enhanced job filtering logic to exclude jobs containing negative keywords.
This commit is contained in:
@@ -16,3 +16,23 @@ def test_http_settings_helpers():
|
||||
assert isinstance(utils.get_backoff_factor(), int)
|
||||
assert isinstance(utils.get_min_delay(), int)
|
||||
assert isinstance(utils.get_max_delay(), int)
|
||||
|
||||
|
||||
def test_negative_keywords_helper():
|
||||
keywords = utils.get_negative_keywords()
|
||||
assert isinstance(keywords, list)
|
||||
for kw in keywords:
|
||||
assert isinstance(kw, str)
|
||||
assert kw == kw.lower()
|
||||
|
||||
|
||||
def test_email_settings_helper():
|
||||
settings = utils.get_email_settings()
|
||||
assert isinstance(settings, dict)
|
||||
assert 'enabled' in settings
|
||||
assert 'from_address' in settings
|
||||
smtp = settings.get('smtp')
|
||||
assert isinstance(smtp, dict)
|
||||
assert 'host' in smtp
|
||||
assert isinstance(smtp.get('port'), int)
|
||||
assert isinstance(settings.get('recipients'), list)
|
||||
|
||||
Reference in New Issue
Block a user