Retroactive TDD! :-P
This commit is contained in:
parent
c4122c3643
commit
89393c390f
@ -12,6 +12,7 @@ __meta__ = dict(
|
|||||||
'flickrscripts = flickrscripts:route',
|
'flickrscripts = flickrscripts:route',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
test_suite='nose.collector',
|
||||||
)
|
)
|
||||||
USAGE = 'Usage: {prog} <subcommand> [args]'
|
USAGE = 'Usage: {prog} <subcommand> [args]'
|
||||||
|
|
||||||
|
@ -41,5 +41,9 @@ def get_flickr_from_rc_file(rc_file=expanduser('~/.flickrscripts.json')):
|
|||||||
return setup_flickr(rc_conf['APIKEY'], rc_conf['APISECRET'])
|
return setup_flickr(rc_conf['APIKEY'], rc_conf['APISECRET'])
|
||||||
|
|
||||||
|
|
||||||
|
def load_rc_file(rc_file=expanduser('~/.flickrscripts.json')):
|
||||||
|
return json.load(open(rc_file))
|
||||||
|
|
||||||
|
|
||||||
class InvalidPhotoIdError(ValueError):
|
class InvalidPhotoIdError(ValueError):
|
||||||
pass
|
pass
|
||||||
|
19
tests/itest_timewarp.py
Normal file
19
tests/itest_timewarp.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
from flickrscripts.timewarp import TimeWarper
|
||||||
|
from flickrscripts.common import load_rc_file
|
||||||
|
|
||||||
|
|
||||||
|
class TimeWarperTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
rc_conf = load_rc_file()
|
||||||
|
self.warper = TimeWarper(rc_conf['APIKEY'], rc_conf['APISECRET'])
|
||||||
|
|
||||||
|
def test_is_not_horribly_busted(self):
|
||||||
|
self.assertTrue(True, 'please forgive the horrible test')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
Loading…
Reference in New Issue
Block a user