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

PictureCacheTests   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
dl 0
loc 22
rs 10
c 3
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A test_Serialize() 0 4 1
A test_Can_be_told_to_persist_picture_to_disk_now() 0 3 1
A test_Stored_picture_can_be_retrieved_as_filepath() 0 3 1
A test_Stored_picture_can_be_retrieved_as_bytes() 0 3 1
A test_Provides_new_picture_file_handle() 0 3 1
1
from unittest import TestCase
2
from mock import Mock, sentinel, patch
3
4
5
class PictureCacheTests(TestCase):
6
7
    def test_Serialize(self):
8
        from niprov.pictures import PictureCache
9
        pictures = PictureCache(sentinel.dependencies)
10
        pictures.serializeSingle(sentinel.img)
11
12
    def test_Provides_new_picture_file_handle(self):
13
        # new()
14
        pass
15
16
    def test_Stored_picture_can_be_retrieved_as_filepath(self):
17
        # keep(fhandle) - > serialize() / getPictureFilepathFor()
18
        pass
19
20
    def test_Stored_picture_can_be_retrieved_as_bytes(self):
21
        # keep(fhandle) - > getPictureDataFor()
22
        pass
23
24
    def test_Can_be_told_to_persist_picture_to_disk_now(self):
25
        # savePictureToDiskFor()
26
        pass
27
28