Completed
Push — master ( e4617d...4b6b67 )
by Jasper
10s
created

SearchTests.test_Search_delegates_to_repository()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 5
rs 9.4285
c 1
b 0
f 0
1
import unittest
2
from mock import Mock
3
from tests.ditest import DependencyInjectionTestBase
4
5
6
class SearchTests(DependencyInjectionTestBase):
7
8
    def setUp(self):
9
        super(SearchTests, self).setUp()
10
11
    def test_Search_delegates_to_repository(self):
12
        from niprov.searching import search
13
        results = search('one day', dependencies=self.dependencies)
14
        self.repo.search.assert_called_with('one day')
15
        self.assertEqual(results, self.repo.search())
16
17