예제 #1
0
def test_find_edition_by_translator():
    edition_stream = stub.FindEditionByTranslator(
        shared_entity.NameRequest(name='edition-english-name-1'))

    for edition in edition_stream.data.edition:
        assert edition.translator == 'Edition-English-Name-1'
예제 #2
0
def test_find_edition_by_language():
    edition_stream = stub.FindEditionByLanguage(
        shared_entity.NameRequest(name='en'))

    for edition in edition_stream.data.edition:
        assert edition.language == 'en'
예제 #3
0
def test_find_edition_by_name():
    edition_stream = stub.FindEditionByName(
        shared_entity.NameRequest(name='edition-name-1'))

    for edition in edition_stream.data.edition:
        assert edition.name == 'Edition-Name-1'
예제 #4
0
def test_find_edition_by_format():
    edition_stream = stub.FindEditionByFormat(
        shared_entity.NameRequest(name='format-1'))

    for edition in edition_stream.data.edition:
        assert edition.format == 'Format-1'
예제 #5
0
def test_find_edition_by_type():
    edition_stream = stub.FindEditionByType(
        shared_entity.NameRequest(name='Arabic'))

    for edition in edition_stream.data.edition:
        assert edition.type == 'Arabic'
예제 #6
0
def test_find_surah_by_english_translation_name():
    res = stub.FindSurahByEnglishNameTranslation(
        shared_entity.NameRequest(name='english-translation-name-2'))

    assert res.data.surah.english_name_translation == 'English-Translation-Name-2'
예제 #7
0
def test_find_surah_by_english_name():
    res = stub.FindSurahByEnglishName(
        shared_entity.NameRequest(name='english-name-2'))

    assert res.data.surah.english_name == 'English-Name-2'
예제 #8
0
def test_find_surah_by_name():
    res = stub.FindSurahByName(shared_entity.NameRequest(name='surah-name-1'))

    assert res.data.surah.name == 'Surah-Name-1'