def create_organization(param): org = Organization() org.slug = param org.title = param org.postal_code = "00-001" org.city = "Warszwa" org.street = "Królewska" org.street_number = "27" org.flat_number = "1" org.street_type = "ul" org.email = "*****@*****.**" org.fax = "123123123" org.tel = "123123123" org.epuap = "epuap" org.regon = "123123123" org.website = "www.www.www" org.save() return org
def valid_organization2(): organization = Organization() organization.slug = "zlodzieje-cienia" organization.title = "Złodzieje cienia" organization.postal_code = "00-002" organization.city = "Wrota Baldura" organization.street = "Schowana" organization.street_number = "3" organization.flat_number = "1" organization.street_type = "ul" organization.email = "*****@*****.**" organization.fax = "321321321" organization.tel = "321321321" organization.epuap = "shthv" organization.regon = "321321321" organization.website = "www.shadowthieves.bg" organization.save() return organization
def valid_organization(): organization = Organization() organization.slug = "test" organization.title = "test" organization.postal_code = "00-001" organization.city = "Warszwa" organization.street = "Królewska" organization.street_number = "27" organization.flat_number = "1" organization.street_type = "ul" organization.email = "*****@*****.**" organization.fax = "123123123" organization.tel = "123123123" organization.epuap = "epuap" organization.regon = "123123123" organization.website = "www.www.www" organization.save() return organization
def test_organization_create(self): organization = Organization() organization.slug = "test" organization.title = "test" organization.postal_code = "00-001" organization.city = "Warszwa" organization.street = "Królewska" organization.street_number = "27" organization.flat_number = "1" organization.street_type = "ul" organization.email = "*****@*****.**" organization.fax = "123123123" organization.tel = "123123123" organization.epuap = "epuap" organization.regon = "123123123" organization.website = "www.www.www" assert organization.id is None organization.save() assert organization.id is not None assert Organization.objects.last().id == organization.id
def inactive_organization(): organization = Organization() organization.slug = "test" organization.title = "test" return organization