~jplacerda/zeitgeist/784850

« back to all changes in this revision

Viewing changes to test/blacklist-test.py

  • Committer: Mikkel Kamstrup Erlandsen
  • Date: 2010-04-28 19:11:01 UTC
  • mfrom: (1322.1.103 ontology_definition)
  • Revision ID: kamstrup@hardback-20100428191101-9pmau6vlqmna0fow
Merge lp:~zeitgeist/zeitgeist/ontology_definition. This introduces some slight API breaks on the Python level and maybe the need for a DB version upgrade to reflect new URIs here and there. We will tackle these issues in trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
                self.assertEquals(empty, [])
33
33
                
34
34
        def testSetOne(self):
35
 
                orig = Event.new_for_values(interpretation=Interpretation.OPEN_EVENT,
 
35
                orig = Event.new_for_values(interpretation=Interpretation.ACCESS_EVENT,
36
36
                                            subject_uri="http://nothingtoseehere.gov")
37
37
                self.blacklist.SetBlacklist([orig])
38
38
                result = map(Event, self.blacklist.GetBlacklist())
40
40
                self.assertEquals(len(result), 1)
41
41
                result = result[0]
42
42
                self.assertEquals(result.manifestation, "")
43
 
                self.assertEquals(result.interpretation, Interpretation.OPEN_EVENT)
 
43
                self.assertEquals(result.interpretation, Interpretation.ACCESS_EVENT)
44
44
                self.assertEquals(len(result.subjects), 1)
45
45
                self.assertEquals(result.subjects[0].uri, "http://nothingtoseehere.gov")
46
46
                self.assertEquals(result.subjects[0].interpretation, "")
48
48
        def testApplyBlacklist(self):
49
49
                self.testSetOne()
50
50
                ev = Event()
51
 
                ev.interpretation = Interpretation.OPEN_EVENT
 
51
                ev.interpretation = Interpretation.ACCESS_EVENT
52
52
                ev.manifestation = Manifestation.USER_ACTIVITY
53
53
                ev.actor = "app.//foo.desktop"
54
54
                subj = ev.append_subject()