lpschedule-generator

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

commit d2ed6e6a62476f3aa63cedeaeeb5014b4bf3ee8f
parent 48a93b8f0e737888bf131d1294eb67d2148d100b
Author: rsiddharth <rsd@gnu.org>
Date:   Sun,  9 Sep 2018 17:59:43 +0000

test_lps_gen.py: Change dictionary key checking.

DICT.has_key(KEY) -> 'KEY' in DICT.

* tests/test_lps_gen.py
(TestLPSpeakers.test_LPSpeakersMarkdown_keynotespeakers_imgurl)
(TestLPSpeakers.test_LPSpeakersMarkdown_keynotespeakers_imgalt)
(TestLPSpeakers.test_LPSpeakersMarkdown_keynotespeakers_bio)
(TestLPSpeakers.test_LPSpeakersMarkdown_speakers_imgurl)
(TestLPSpeakers.test_LPSpeakersMarkdown_speakers_imgalt)
(TestLPSpeakers.test_LPSpeakersMarkdown_speakers_bio): Update methods.

Diffstat:
tests/test_lps_gen.py | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/test_lps_gen.py b/tests/test_lps_gen.py @@ -770,7 +770,7 @@ class TestLPSpeakers(object): i = 0 for kspeaker in self.lpspeakers_dict['keynote-speakers']: - if kspeaker.has_key('img_url'): + if 'img_url' in kspeaker: assert_equal(kspeaker['img_url'], keynote_speaker_img_urls[i]) i = i + 1 @@ -789,7 +789,7 @@ class TestLPSpeakers(object): i = 0 for kspeaker in self.lpspeakers_dict['keynote-speakers']: - if kspeaker.has_key('img_alt'): + if 'img_alt' in kspeaker: assert_equal(kspeaker['img_alt'], keynote_speaker_img_alts[i]) i = i + 1 @@ -811,7 +811,7 @@ class TestLPSpeakers(object): i = 0 for kspeaker in self.lpspeakers_dict['keynote-speakers']: - if kspeaker.has_key('bio'): + if 'bio' in kspeaker: j = 0 for p in kspeaker['bio']: p.startswith(keynote_speaker_bios[i][j]) @@ -879,7 +879,7 @@ class TestLPSpeakers(object): i = 0 for kspeaker in self.lpspeakers_dict['speakers']: - if kspeaker.has_key('img_url'): + if 'img_url' in kspeaker: assert_equal(kspeaker['img_url'], speaker_img_urls[i]) i = i + 1 @@ -901,7 +901,7 @@ class TestLPSpeakers(object): i = 0 for kspeaker in self.lpspeakers_dict['speakers']: - if kspeaker.has_key('img_alt'): + if 'img_alt' in kspeaker: assert_equal(kspeaker['img_alt'], speaker_img_alts[i]) i = i + 1 @@ -926,7 +926,7 @@ class TestLPSpeakers(object): i = 0 for kspeaker in self.lpspeakers_dict['speakers']: - if kspeaker.has_key('bio'): + if 'bio' in kspeaker: j = 0 for p in kspeaker['bio']: p.startswith(speaker_bios[i][j])