def is_imported(row_id): if KnowledgeTableColumnMapRecord.exist_import_record( session, jdk_method_knowledge_table, api_relation_table, row_id, "class_id"): return True else: return False
def is_imported(row_id): if KnowledgeTableColumnMapRecord.exist_import_record( session, jdk_package_knowledge_table, api_belong_to_table, row_id, "library_id"): return True else: return False
def test_exist_import_record(self): session = EngineFactory.create_session() jdk_method_knowledge_table = KnowledgeTableFactory.get_jdk_method_table(session) api_relation_table = KnowledgeTableFactory.get_api_relation_table(session) api_knowledge_table = KnowledgeTableFactory.get_api_entity_table(session) result= KnowledgeTableColumnMapRecord.exist_import_record(session, jdk_method_knowledge_table, api_relation_table, 1, "class_id") print result self.assertEqual(result,True)