コード例 #1
0
ファイル: test_tasks.py プロジェクト: KryDos/mozillians
 def test_unindex_objects(self, get_es_mock):
     model = MagicMock()
     unindex_objects(model, [1, 2, 3], 'foo')
     ok_(model.unindex.called)
     model.assert_has_calls([
         call.unindex(es=get_es_mock(), public_index='foo', id=1),
         call.unindex(es=get_es_mock(), public_index='foo', id=2),
         call.unindex(es=get_es_mock(), public_index='foo', id=3)])
コード例 #2
0
ファイル: test_tasks.py プロジェクト: viorelaioia/mozillians
 def test_unindex_objects(self, get_es_mock):
     mapping_type = MagicMock()
     unindex_objects(mapping_type, [1, 2, 3], 'foo')
     ok_(mapping_type.unindex.called)
     mapping_type.assert_has_calls([
         call.unindex(1, es=get_es_mock(), public_index='foo'),
         call.unindex(2, es=get_es_mock(), public_index='foo'),
         call.unindex(3, es=get_es_mock(), public_index='foo')])
コード例 #3
0
ファイル: test_tasks.py プロジェクト: kausdev/mozillians
 def test_unindex_objects(self, get_es_mock):
     mapping_type = MagicMock()
     unindex_objects(mapping_type, [1, 2, 3], 'foo')
     ok_(mapping_type.unindex.called)
     mapping_type.assert_has_calls([
         call.unindex(1, es=get_es_mock(), public_index='foo'),
         call.unindex(2, es=get_es_mock(), public_index='foo'),
         call.unindex(3, es=get_es_mock(), public_index='foo')])
コード例 #4
0
 def test_unindex_objects(self, get_es_mock):
     model = MagicMock()
     unindex_objects(model, [1, 2, 3], 'foo')
     ok_(model.unindex.called)
     model.assert_has_calls([
         call.unindex(es=get_es_mock(), public_index='foo', id=1),
         call.unindex(es=get_es_mock(), public_index='foo', id=2),
         call.unindex(es=get_es_mock(), public_index='foo', id=3)
     ])