def test_find_image_by_ayah_id(): res = stub.FindImageByAyahId(shared_entity.IDRequest(id='ayah-1')) assert res.data.image.ayah_id == 'ayah-1' assert res.data.image.image == 'link to image'
def test_find_edition_by_id(): res = stub.FindEditionById(shared_entity.IDRequest(id='edition-1')) assert res.data.edition.id == 'edition-1' assert res.data.edition.name == 'Edition-Name-1'
def test_find_audio_by_edition_id(): res_stream = stub.FindAudioByEditionId( shared_entity.IDRequest(id='edition-1')) for res in res_stream.data.audio: assert res.edition_id == 'edition-1'
def test_find_surah_by_id(): res = stub.FindSurahById(shared_entity.IDRequest(id='surah-1')) assert res.data.surah.id == 'surah-1'
def test_find_audio_by_ayah_id(): res_stream = stub.FindAudioByAyahId(shared_entity.IDRequest(id='ayah-1')) for res in res_stream.data.audio: assert res.ayah_id == 'ayah-1'
def test_find_audio_by_id(): res = stub.FindAudioById(shared_entity.IDRequest(id='audio-1')) assert res.data.audio.id == 'audio-1' assert res.data.audio.ayah_id == 'ayah-1'
def test_find_translation_by_edition_id(): translation_stream = stub.FindTranslationByEditionId(shared_entity.IDRequest(id='edition-1')) for translation in translation_stream.data.translation: assert translation.edition_id == 'edition-1'
def test_find_translation_by_ayah_id(): translation_stream = stub.FindTranslationByAyahId(shared_entity.IDRequest(id='ayah-1')) for translation in translation_stream.data.translation: assert translation.ayah_id == 'ayah-1'
def test_find_translation_by_id(): res = stub.FindTranslationById(shared_entity.IDRequest(id='translation-1')) assert res.data.translation.id == 'translation-1'