コード例 #1
0
 def test_equals(self):
     '''
     Ensure that tufo equality works where expected.
     '''
     r = s_tufo.equal(tuf0=self.t1, tuf1=self.t2)
     self.true(r)
     r = s_tufo.equal(tuf0=self.t1, tuf1=self.t6)
     self.true(r)
コード例 #2
0
 def test_not_equals(self):
     '''
     Ensure that tufo equality works where expected.
     '''
     r = s_tufo.equal(tuf0=self.t1, tuf1=self.t3)
     self.false(r)
     r = s_tufo.equal(tuf0=self.t1, tuf1=self.t4)
     self.false(r)
     r = s_tufo.equal(tuf0=self.t1, tuf1=self.t5)
     self.false(r)
コード例 #3
0
 def test_kwargs_tufo_creation(self):
     '''
     Ensure that tufos' can be created via **kwargs.
     '''
     tuf0 = s_tufo.tufo('bar', **{'baz': 'faz', 'derp': 20, })
     r = s_tufo.equal(tuf0, self.tuf0)
     self.true(r)
コード例 #4
0
 def test_simple_tufo_creation(self):
     '''
     Ensure that tufos can be created with explicit arguments.
     '''
     tuf0 = s_tufo.tufo('bar', baz='faz', derp=20)
     r = s_tufo.equal(tuf0, self.tuf0)
     self.true(r)