diff options
author | rsiddharth <rsd@gnu.org> | 2016-05-11 04:10:07 +0000 |
---|---|---|
committer | rsiddharth <rsd@gnu.org> | 2016-05-11 04:10:07 +0000 |
commit | ddd7c33e8e488ebfb163cef2ebd2ef6cbc9f6dc0 (patch) | |
tree | 8161ac83f5f26f4c93e5b677393e947c396c7de4 /tests | |
parent | faf6829a09cde3319c802ec3c0bda75855cb7cda (diff) |
Add `DescTBA` feature for LP Schedule.
From now on `DescTBA` can be given if the description for a session is
not decided yet; `DescTBA` will be filtered out of the generated HTML.
Addresses issue #4.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_lps_gen.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_lps_gen.py b/tests/test_lps_gen.py index 0a8efff..ed479b7 100644 --- a/tests/test_lps_gen.py +++ b/tests/test_lps_gen.py @@ -553,6 +553,10 @@ class TestLPSTBA(object): if len(s.strip())]) + def cleanup_desc(self, desc): + return desc.replace('\n', '').strip() + + def test_LP_speakers(self): """Tests the non-existence of `SpeakerTBA` in gen. HTML. @@ -589,6 +593,27 @@ class TestLPSTBA(object): assert_equal(room_block, rooms.pop(0)) + def test_LP_description(self): + """Tests the non-existence of `DescTBA` in gen. HTML. + """ + descriptions = [ + 'Your workplace can exert a lot of control over how', + 'Free software developers and users tend to be most', + 'This talk will help you gather information, frame', + 'A look back at free software history', + 'Academic Institutions and their researchers', + 'At CUNY, we have taken steps to change this', + 'Being a free software user isn\'t easy,', + 'In this session, I\'ll give students tips', + ] + + for descs in self.soup.find_all(class_='session-desc'): + for desc in descs.strings: + desc = self.cleanup_desc(desc) + if desc: + assert desc.startswith(descriptions.pop(0)) + + def teardown(self): """Cleans up things after each test in this class. |