| Conditions | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from unittest import TestCase |
||
| 8 | def test_saveSnapshot(self): |
||
| 9 | from niprov.camera import Camera |
||
| 10 | camera = Camera(self.dependencies) |
||
| 11 | camera.takeSnapshot = Mock() |
||
| 12 | target = Mock() |
||
| 13 | camera.saveSnapshot(target) |
||
| 14 | newPicture = self.pictureCache.new() |
||
| 15 | camera.takeSnapshot.assert_called_with(target, on=newPicture) |
||
| 16 | self.pictureCache.keep.assert_called_with(newPicture) |
||
| 17 | |||
| 19 |