Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2010-09-10 21:50:38 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2010-09-10 21:50:38 (GMT)
commit4d8f60e868daa7343b0c13a22cbdbabe3b55211d (patch)
tree4a5a6871919cf21d062cc0076a6a441ea9066baa /tests
parent72cdcb42ebbb910b38758f4656cf1aceb6bca9d5 (diff)
Remove logging to let MyLogger handle all logs
Diffstat (limited to 'tests')
-rw-r--r--tests/run_test.py44
1 files changed, 10 insertions, 34 deletions
diff --git a/tests/run_test.py b/tests/run_test.py
index 07aecdf..5fdbc7e 100644
--- a/tests/run_test.py
+++ b/tests/run_test.py
@@ -170,81 +170,57 @@ class MeetBotTest(unittest.TestCase):
results = self.M_trivial(extraConfig={}).save()
self.assert_('<link rel="stylesheet" ' not in results['.html'])
self.assert_('body {' in results['.html'])
- self.assert_('<link rel="stylesheet" ' not in results['.log.html'])
- self.assert_('body {' in results['.log.html'])
def test_css_noembed(self):
- extraConfig={'cssEmbed_minutes':False,
- 'cssEmbed_log':False,}
+ extraConfig={'cssEmbed_minutes':False}
M = self.M_trivial(extraConfig=extraConfig)
results = M.save()
self.assert_('<link rel="stylesheet" ' in results['.html'])
self.assert_('body {' not in results['.html'])
- self.assert_('<link rel="stylesheet" ' in results['.log.html'])
- self.assert_('body {' not in results['.log.html'])
def test_css_file(self):
tmpf = tempfile.NamedTemporaryFile()
magic_string = '546uorck6o45tuo6'
tmpf.write(magic_string)
tmpf.flush()
- extraConfig={'cssFile_minutes': tmpf.name,
- 'cssFile_log': tmpf.name,}
+ extraConfig={'cssFile_minutes': tmpf.name}
M = self.M_trivial(extraConfig=extraConfig)
results = M.save()
self.assert_('<link rel="stylesheet" ' not in results['.html'])
self.assert_(magic_string in results['.html'])
- self.assert_('<link rel="stylesheet" ' not in results['.log.html'])
- self.assert_(magic_string in results['.log.html'])
def test_css_file_embed(self):
tmpf = tempfile.NamedTemporaryFile()
magic_string = '546uorck6o45tuo6'
tmpf.write(magic_string)
tmpf.flush()
extraConfig={'cssFile_minutes': tmpf.name,
- 'cssFile_log': tmpf.name,
- 'cssEmbed_minutes': False,
- 'cssEmbed_log': False,}
+ 'cssEmbed_minutes': False}
M = self.M_trivial(extraConfig=extraConfig)
results = M.save()
self.assert_('<link rel="stylesheet" ' in results['.html'])
self.assert_(tmpf.name in results['.html'])
- self.assert_('<link rel="stylesheet" ' in results['.log.html'])
- self.assert_(tmpf.name in results['.log.html'])
def test_css_none(self):
tmpf = tempfile.NamedTemporaryFile()
magic_string = '546uorck6o45tuo6'
tmpf.write(magic_string)
tmpf.flush()
- extraConfig={'cssFile_minutes': 'none',
- 'cssFile_log': 'none',}
+ extraConfig={'cssFile_minutes': 'none'}
M = self.M_trivial(extraConfig=extraConfig)
results = M.save()
self.assert_('<link rel="stylesheet" ' not in results['.html'])
self.assert_('<style type="text/css" ' not in results['.html'])
- self.assert_('<link rel="stylesheet" ' not in results['.log.html'])
- self.assert_('<style type="text/css" ' not in results['.log.html'])
def test_filenamevars(self):
- def getM(fnamepattern):
+ def getM():
M = meeting.Meeting(channel='somechannel',
network='somenetwork',
- owner='nobody',
- extraConfig={'filenamePattern':fnamepattern})
+ owner='nobody')
M.addline('nobody', '#startmeeting')
return M
- # Test the %(channel)s and %(network)s commands in supybot.
- M = getM('%(channel)s-%(network)s')
- assert M.config.filename().endswith('somechannel-somenetwork'), \
- "Filename not as expected: "+M.config.filename()
# Test dates in filenames
- M = getM('%(channel)s-%%F')
+ M = getM()
import time
- assert M.config.filename().endswith(time.strftime('somechannel-%F')),\
- "Filename not as expected: "+M.config.filename()
- # Test #meetingname in filenames
- M = getM('%(channel)s-%(meetingname)s')
- M.addline('nobody', '#meetingname blah1234')
- assert M.config.filename().endswith('somechannel-blah1234'),\
- "Filename not as expected: "+M.config.filename()
+ assert M.config.filename().endswith(time.strftime(
+ 'somechannel/%Y-%m-%dT%H:%M:%S', M.starttime)),\
+ "Filename not as expected: "+M.config.filename()
if __name__ == '__main__':