Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
RC - fixed so that ids of reg and rsv are bible types. Added unit tes…
Browse files Browse the repository at this point in the history
…t case.
  • Loading branch information
PhotoNomad0 committed Jun 5, 2017
1 parent e66a54e commit c3b1dc3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resource_container/ResourceContainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,12 @@ def identifier(self):
if 'identifier' in self.resource and self.resource['identifier']:
return self.resource['identifier']
if 'id' in self.resource and self.resource['id']:
return self.resource['id']
id = self.resource['id']
if id in ['reg', 'rsv']:
return 'bible'
else:
return id

elif 'slug' in self.resource and self.resource['slug']:
slug = self.resource['slug']
if 'ulb' in slug:
Expand Down
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/client_tests/test_bible_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ def test_BiblePreprocessorComplete(self):
#then
self.verifyTransform(folder, expectedOutput)

def test_BiblePreprocessorActsWithSlashInText(self):

#given
file_name = os.path.join('raw_sources', 'awa_act_text_reg.zip')
repo_name = 'awa_act_text_reg'
expectedOutput = '45-ACT.usfm'
rc, repo_dir, self.temp_dir = self.extractFiles(file_name, repo_name)

# when
folder = self.runBiblePreprocessor(rc, repo_dir)

#then
self.verifyTransform(folder, expectedOutput)

@classmethod
def extractFiles(self, file_name, repo_name):
file_path = os.path.join(TestBiblePreprocessor.resources_dir, file_name)
Expand Down

0 comments on commit c3b1dc3

Please sign in to comment.