Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Oct 28, 2022
1 parent 87cb85f commit a0aa7dd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py/desitransfer/test/test_tucson.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ def test_options(self):
def test_configure_log(self, mock_log, gl, smtp):
"""Test logging configuration.
"""
with patch.dict('os.environ', {'DESI_MAILTO': 'desi-alarms-transfer@desi.lbl.gov'}):
with patch.dict('os.environ', {'MAILTO': 'alerts@my.org',
'MAILFROM': 'from.me@example.com'}):
_configure_log(True)
gl.assert_called_once_with(timestamp=True)
gl().setLevel.assert_called_once_with(logging.DEBUG)
email_from = 'NOIRLab Mirror Account <{0}@{1}>'.format(os.environ['USER'], getfqdn())
email_from = 'NOIRLab Mirror Account <from.me@example.com>'
smtp.assert_called_once_with('localhost', email_from,
['desi-alarms-transfer@desi.lbl.gov'],
['alerts@me.org'],
'Error reported by desi_tucson_transfer!')

def test_rsync(self):
Expand Down

0 comments on commit a0aa7dd

Please sign in to comment.