]> scripts.mit.edu Git - wizard.git/blob - wizard/tests/old_log_test.py
Remove string exception from remaster.
[wizard.git] / wizard / tests / old_log_test.py
1 import os.path
2 from dateutil.tz import tzoffset
3 from datetime import datetime
4
5 from wizard import app, deploy, old_log, tests
6
7 def test_deploy_log_load():
8     # this also is test_deploy_source_parse() and test_application_version_parse()
9     dlog = old_log.DeployLog.load(deploy.Deployment(tests.getTestFile("old_log_test")))
10
11     assert dlog[0].datetime == datetime(2006, 3, 23, 10, 7, 40, tzinfo=tzoffset(None, -5 * 60 * 60))
12     assert dlog[0].user == "unknown"
13     assert isinstance(dlog[0].source, old_log.TarballInstall)
14     assert dlog[0].source.location == "/afs/athena.mit.edu/contrib/scripts/deploy/mediawiki.tar.gz"
15     assert dlog[0].source.isDev == False
16     assert dlog[0].version == app.applications()["mediawiki"].makeVersion('1.5.6')
17
18     assert dlog[1].datetime == datetime(2007, 10, 17, 3, 38, 2, tzinfo=tzoffset(None, -4 * 60 * 60))
19     assert dlog[1].user == "quentin@QUICHE-LORRAINE.MIT.EDU"
20     assert isinstance(dlog[1].source, old_log.OldUpdate)
21     assert dlog[1].source.isDev == True
22     assert dlog[1].version == app.applications()["mediawiki"].makeVersion('1.5.6')
23