def save_profile_entity(self): """ Save a test profile entity. """ profile = ProfileEntity() profile.user_id = 1 profile.first_name = "Jared" profile.last_name = "Blouse" self.assertTrue(profile.save())
def test_entities(self): """ Test the to_json of models. """ profile = ProfileEntity() profile.first_name = "Jared" profile.last_name = "Blouse" profile.business_phone = "123-456-7890" profile.home_phone = "123-456-7890" profile.email = "*****@*****.**" profile.fax = "123-456-7890" profile.mobile_phone = "123-456-7890" project_list = list() project1 = ProjectEntity() project1.description = "Test project" project1.save() skill = SkillEntity() skill.name = "C#" skill.years_experience = 9 skill.level = 9 skill.save() project_list.append(project1) profile.projects = project_list profile.user_id = 5 profile.url = "www.corpseware.com" self.assertTrue(profile.save())