Feed in more data
svn: r5291
This commit is contained in:
parent
8fa8bb103b
commit
11a576fc22
@ -308,6 +308,15 @@ class TestcaseGenerator(Tool.Tool):
|
||||
self.default_place.add_media_reference(self.default_mediaref)
|
||||
self.default_place.add_url(self.default_url)
|
||||
self.db.add_place(self.default_place, self.trans)
|
||||
self.default_address = RelLib.Address()
|
||||
self.default_address.set_street("Teststreet")
|
||||
self.default_address.set_phone("012 34 56 78")
|
||||
self.default_address.set_city("Testcity")
|
||||
self.default_address.set_state("Teststate")
|
||||
self.default_address.set_country("Testcountry")
|
||||
self.default_address.set_postal_code("12345")
|
||||
self.default_address.set_note("Generated by TestcaseGenerator")
|
||||
self.default_address.add_source_reference(self.default_sourceref)
|
||||
|
||||
if self.options.handler.options_dict['bugs']:
|
||||
self.generate_broken_relations()
|
||||
@ -735,7 +744,22 @@ class TestcaseGenerator(Tool.Tool):
|
||||
lastname = lastname.upper()
|
||||
name.set_first_name(firstname)
|
||||
name.set_surname(lastname)
|
||||
name.add_source_reference(self.default_sourceref)
|
||||
name.set_note("Generated by TestcaseGenerator")
|
||||
np.set_primary_name(name)
|
||||
|
||||
# generate some slightly different alternate name
|
||||
alt_name = RelLib.Name(name)
|
||||
firstname2 = firstname.replace("m", "n").replace("l", "i").replace("b", "d")
|
||||
if firstname2 != firstname:
|
||||
alt_name.set_first_name( firstname2)
|
||||
alt_name.set_title( "Testtitle")
|
||||
alt_name.set_patronymic( "Testpatronymic")
|
||||
alt_name.set_surname_prefix( "van")
|
||||
alt_name.set_suffix( "the second")
|
||||
alt_name.add_source_reference(self.default_sourceref)
|
||||
alt_name.set_note("Generated by TestcaseGenerator")
|
||||
np.add_alternate_name( alt_name)
|
||||
|
||||
self.person_count = self.person_count+1
|
||||
|
||||
@ -833,6 +857,7 @@ class TestcaseGenerator(Tool.Tool):
|
||||
object.add_attribute( self.default_attribute)
|
||||
try:
|
||||
object.add_url(self.default_url)
|
||||
object.add_address(self.default_address)
|
||||
except AttributeError:
|
||||
pass # family does not have an url
|
||||
object.set_note("Generated by TestcaseGenerator")
|
||||
|
Loading…
Reference in New Issue
Block a user