Completed
Pull Request — master (#136)
by Jasper
01:18
created

ViewerMediumTests   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_Returns_input() 0 7 2
1
#!/usr/bin/python
2
# -*- coding: UTF-8 -*-
3
from mock import Mock, sentinel, patch
4
from tests.ditest import DependencyInjectionTestBase
5
6
7
class ViewerMediumTests(DependencyInjectionTestBase):
8
9
    def test_Returns_input(self):
10
        from niprov.mediumviewer import ViewerMedium
11
        exporter = ViewerMedium()
12
        fmt = Mock()
13
        with patch('niprov.mediumviewer.webbrowser') as webbrowser:
14
            exporter.export('the filename', fmt)
15
            webbrowser.open.assert_called_with('the filename')
16
17
18
19