Package schrodinger :: Package test :: Module project_mock
[hide private]
[frames] | no frames]

Module project_mock


This module has classes that can be used to mock out project related
functionality that cannot be accessed from outside of Maestro for unit tests.

An example of how to use would be to have a setUp function in a
L{unittest.TestCase} derived class that does the following:

class MyTestClass(unittest.TestCase):

    def setUp(self):
        self.mock_mae = MagicMock()
        mymodule.maestro = self.mock_mae
        self.pt = MockProjectTable('project_sts.maegz')
        self.mock_mae.project_table_get = MagicMock(return_value=self.pt)

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  MockProjectRow
Standin for the schrodinger.project.ProjectRow class for tests.
  MockProjectTable
Stands in for the schrodinger.project.Project class for the tests.
Variables [hide private]
  __package__ = 'schrodinger.test'