def test_basic(self): # Check for self.main_db_resource to be updated and # self.other_db_resource to be created. self.main_db_resource.total_strings = 5000 self.main_db_resource.save() self.other_db_resource.delete() update_resources(self.db_project, self.vcs_project) self.main_db_resource.refresh_from_db() assert_equal(self.main_db_resource.total_strings, len(self.main_vcs_resource.entities)) other_db_resource = Resource.objects.get(path=self.other_vcs_resource.path) assert_equal(other_db_resource.total_strings, len(self.other_vcs_resource.entities))
def test_basic(self): # Check for self.main_db_resource to be updated and # self.other_db_resource to be created. self.main_db_resource.entity_count = 5000 self.main_db_resource.save() self.other_db_resource.delete() update_resources(self.db_project, self.vcs_project) self.main_db_resource.refresh_from_db() assert_equal(self.main_db_resource.entity_count, len(self.main_vcs_resource.entities)) other_db_resource = Resource.objects.get(path=self.other_vcs_resource.path) assert_equal(other_db_resource.entity_count, len(self.other_vcs_resource.entities))