lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

commit faf6829a09cde3319c802ec3c0bda75855cb7cda
parent f896e22ac564b84c0e5307c2dd461e82b3dd24f1
Author: rsiddharth <rsd@gnu.org>
Date:   Wed, 11 May 2016 04:08:55 +0000

Add test for `RoomTBA`.

Addresses issue #4.

Diffstat:
libreplanet-templates/2016/lp-schedule.jinja2 | 2+-
tests/test_lps_gen.py | 17+++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/libreplanet-templates/2016/lp-schedule.jinja2 b/libreplanet-templates/2016/lp-schedule.jinja2 @@ -39,7 +39,7 @@ {# make room macro #} {% macro mk_room(room) %} {% if room|lower != 'roomtba' %} - <span class="label label-default">{{ room }}</span> + <span class="room label label-default">{{ room }}</span> {% endif %} {% endmacro %} diff --git a/tests/test_lps_gen.py b/tests/test_lps_gen.py @@ -572,6 +572,23 @@ class TestLPSTBA(object): assert_equal(sp_block, speakers.pop(0)) + def test_LP_room(self): + """Tests the non-existence of `RoomTBA` in gen. HTML. + + """ + rooms = [ + 'Room 32-141', + 'Room 32-144', + 'Room 31-123', + 'Room 32-144', + 'Room 42-042', + ] + + for sp in self.soup.find_all(class_='room'): + room_block = sp.string + assert_equal(room_block, rooms.pop(0)) + + def teardown(self): """Cleans up things after each test in this class.