<s> import io <EOL> import json <EOL> import os <EOL> from unittest import TestCase <EOL> from mock import patch <EOL> from jira . resources import Issue <EOL> class BaseTestCase ( TestCase ) : <EOL> def get_asset_path ( self , filename ) : <EOL> return os . path . join ( <EOL> os . path . dirname ( __file__ ) , <EOL> '<STR_LIT>' , <EOL> filename <EOL> ) <EOL> def get_asset_contents ( self , filename , mode = '<STR_LIT:r>' ) : <EOL> path = self . get_asset_path ( filename ) <EOL> with io . open ( path , mode , encoding = '<STR_LIT:utf-8>' ) as r : <EOL> return r . read ( ) <EOL> def rehydrate_issue ( self , filename ) : <EOL> stored = json . loads ( self . get_asset_contents ( filename ) ) <EOL> return Issue ( <EOL> stored [ '<STR_LIT>' ] , <EOL> None , <EOL> stored [ '<STR_LIT>' ] , <EOL> ) <EOL> def get_empty_status ( self ) : <EOL> return { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : [ ] , <EOL> '<STR_LIT>' : { } , <EOL> '<STR_LIT>' : { } , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : [ ] , <EOL> '<STR_LIT>' : { } , <EOL> '<STR_LIT>' : { } , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : [ ] , <EOL> } , <EOL> '<STR_LIT>' : True , <EOL> } </s>
