Skip to content

Instantly share code, notes, and snippets.

Created May 10, 2010 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/395541 to your computer and use it in GitHub Desktop.
Save anonymous/395541 to your computer and use it in GitHub Desktop.
class AttemptDB:
def __init__(self):
self.test = 0
@staticmethod
def GetAllX():
return []
from mmdb.DataAccess.AttemptDB import AttemptDB
class AttemptManager:
def __init__(self):
self.test = 0
@staticmethod
def GetAll():
return AttemptDB.GetAllX()
mmm\importtest-Test.py
mmm\importtest.py
mmm\mmdb
mmm\__init__.py
mmm\mmdb\BusinessLogic
mmm\mmdb\BusinessObject
mmm\mmdb\DataAccess
mmm\mmdb\__init__.py
mmm\mmdb\BusinessLogic\AttemptManager.py
mmm\mmdb\BusinessLogic\Collections
mmm\mmdb\BusinessLogic\__init__.py
mmm\mmdb\BusinessLogic\Collections\__init__.py
mmm\mmdb\BusinessObject\__init__.py
mmm\mmdb\DataAccess\AttemptDB.py
mmm\mmdb\DataAccess\__init__.py
import importtest
#from importtest import gatest
# Here's our "unit tests".
class gatestTestCase(unittest.TestCase):
def setUp(self):
pass
class gatestTests(gatestTestCase):
def testQuestionProvided(self):
'''Test that some sort of question is posed'''
l = importtest.gatest()
print l
self.failUnless(len(l)==0)
def main():
unittest.main()
if __name__ == '__main__':
main()
from mmdb.BusinessLogic.AttemptManager import AttemptManager
def gatest():
return AttemptManager.GetAll()
#return []
def main():
import pprint
import os
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(os.sys.path)
ret = gatest()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment