Code Duplication    Length = 11-12 lines in 2 locations

tests/test_MongoRepo.py 2 locations

@@ 237-248 (lines=12) @@
234
        self.setupRepo()
235
        self.repo.search('xyz')
236
        self.db.provenance.find.assert_called_with({'$text':{'$search': 'xyz'}})
237
        self.fileFactory.fromProvenance.assert_any_call('r1')
238
        self.fileFactory.fromProvenance.assert_any_call('r2')
239
240
    def test_Query_for_ALL_field(self):
241
        self.db.provenance.distinct.return_value = ['r1','r2']
242
        self.setupRepo()
243
        q = Mock()
244
        field1 = Mock()
245
        field1.name = 'color'
246
        field1.all = True
247
        q.getFields.return_value = [field1]
248
        out = self.repo.inquire(q)
249
        self.db.provenance.distinct.assert_called_with('color')
250
        assert not self.fileFactory.fromProvenance.called
251
@@ 267-277 (lines=11) @@
264
263
262
261
260
259
258
257
256
255
254
253
252