Exemple #1
0
 def test_using(self):
     o = object()
     o2 = object()
     s = Search(using=o)
     self.assertIs(s._using, o)
     s2 = s.using(o2)
     self.assertIs(s._using, o)
     self.assertIs(s2._using, o2)
Exemple #2
0
def test_using():
    o = object()
    o2 = object()
    s = Search(using=o)
    assert s._using is o
    s2 = s.using(o2)
    assert s._using is o
    assert s2._using is o2