def test_DecisionModelProxy_GetFilteredOnTextKeywords(self): from Decisions.DBProxy import DecisionModelProxy word = 'umfasst' result = DecisionModelProxy.GetListFromTextKeywords( Reasons__contains=word) test = [x for x in result if x.CaseNumber == 'T 0336/15'] self.assertNotEqual(test, [])
def test_citationFrequency(self): from Decisions.DBProxy import DecisionModelProxy from Decisions.Analysers import AnalysisHelpers decisions = DecisionModelProxy.GetAllForBoard('3.1.01') x = AnalysisHelpers.CitationFrequency(decisions) y = {dec.CaseNumber: count for (dec, count) in x.items()} self.assertTrue(y['J 0005/80'] > 50)
def test_DecisionModelProxy_GetFilteredOnBibliographyKeywords(self): from Decisions.DBProxy import DecisionModelProxy casenumber = 'T 0641/00' result = DecisionModelProxy.GetListFromBibliographyKeywords( CaseNumber=casenumber) self.assertEqual(len(result), 3) for r in result: self.assertEqual(r.CaseNumber, casenumber)
def test_AllGoodCited(self): from DecisionsPlus import DecisionModelProxy casenumber = 'G 0001/83' decision = DecisionModelProxy.GetListFromKeywords( CaseNumber=casenumber)[0] x = decision.CaseNumber y = decision.pk z = decision.AllGoodCited a = 1
def test_articleFrequency(self): from Decisions.DBProxy import DecisionModelProxy from Decisions.Analysers import AnalysisHelpers decisions = (DecisionModelProxy.GetListFromCaseNumber('T 0954/98')) x = AnalysisHelpers.AttributeFrequency(decisions) self.assertEqual(x['131'], 1)
def test_ipcFrequency(self): from Decisions.DBProxy import DecisionModelProxy from Decisions.Analysers import AnalysisHelpers decisions = DecisionModelProxy.GetListFromCaseNumber('G 0001/97') x = AnalysisHelpers.IpcFrequency(decisions) self.assertEqual(x['G04B 37/16'], 3)
def test_GetBoardList(self): from Decisions.DBProxy import DecisionModelProxy boards = DecisionModelProxy.GetBoardList() self.assertEqual(len(boards), 32)