massive update

This commit is contained in:
2019-01-08 16:09:15 +05:00
parent ad71e72294
commit 39916fa5fb
22 changed files with 1260 additions and 70 deletions

View File

@ -20,7 +20,8 @@ class TestDataProvider(TestCase):
loc = Location(None, "Russia", "Orenburg", "Elovaya", "16", "259A",
date(2010, 11, 28), None)
num = PhoneNumber(None, date(2018, 10, 10), None)
cont = ContactInfo(None, "hello@gmail.com", [num], [head], [loc])
cont = ContactInfo(None, "hello@gmail.com", [num], [head], [loc],
'name', 'short_name', 'code')
self.dp.create_contact_info(cont)
print(f"ContactInfo id is {cont.id}")
self.assertIsNotNone(cont.id)
@ -36,15 +37,17 @@ class TestDataProvider(TestCase):
loc = Location(None, "Russia", "Orenburg", "Elovaya", "16", "259A",
date(2010, 11, 28), None)
num = PhoneNumber(None, date(2018, 10, 10), None)
cont = ContactInfo(None, "hello@gmail.com", [num], [head], [loc])
cont = ContactInfo(None, "hello@gmail.com", [num], [head], [loc],
'name', 'short_name', 'code')
head_div = Head(None, date(1998, 10, 11), None)
loc_div = Location(None, "Russia", "Orenburg", "Elovaya", "16", "259A",
date(2010, 11, 28), None)
date(2010, 11, 28), None)
num_div = PhoneNumber(None, date(2018, 10, 10), None)
cont_div = ContactInfo(None, "eeeeee", [num_div],
[head_div], [loc_div])
[head_div], [loc_div], 'name', 'short_name',
'code')
div = Division(None, cont_div, [])
enterprise = Enterprise(None, [], [div], cont, "hello", "world")
enterprise = Enterprise(None, [], [div], cont)
self.dp.create_enterprise(enterprise)
self.assertIsNotNone(div.id)
self.assertIsNotNone(enterprise.id)
@ -62,15 +65,17 @@ class TestDataProvider(TestCase):
loc = Location(None, "Russia", "Orenburg", "Elovaya", "16", "259A",
date(2010, 11, 28), None)
num = PhoneNumber(None, date(2018, 10, 10), None)
cont = ContactInfo(None, "hello@gmail.com", [num], [head], [loc])
cont = ContactInfo(None, "hello@gmail.com", [num], [head], [loc],
'name', 'short_name', 'code')
head_div = Head(None, date(1998, 10, 11), None)
loc_div = Location(None, "Russia", "Orenburg", "Elovaya", "16", "259A",
date(2010, 11, 28), None)
date(2010, 11, 28), None)
num_div = PhoneNumber(None, date(2018, 10, 10), None)
cont_div = ContactInfo(None, "eeeeee", [num_div],
[head_div], [loc_div])
[head_div], [loc_div], 'name', 'short_name',
'code')
div = Division(None, cont_div, [act])
enterprise = Enterprise(None, [act], [div], cont, "hello", "world")
enterprise = Enterprise(None, [act], [div], cont)
self.dp.create_enterprise(enterprise)
test_enterprise = self.dp.get_enterprise_by_id(enterprise.id)
self.assertGreater(len(test_enterprise.activities), 0)