Ejemplo n.º 1
0
    def setUp(self):
        super(DataFixtureValidatorTest, self).setUp()
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)
        self.mock_feedback = self.mox.CreateMock(ExecutionFeedback)

        self.mock_host_controller.feedback = self.mock_feedback
        self.data_fixture_validator = DataFixtureValidator(self.mock_host_controller)
Ejemplo n.º 2
0
class DataFixtureValidatorTest(mox.MoxTestBase):

    def setUp(self):
        super(DataFixtureValidatorTest, self).setUp()
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)
        self.mock_feedback = self.mox.CreateMock(ExecutionFeedback)

        self.mock_host_controller.feedback = self.mock_feedback
        self.data_fixture_validator = DataFixtureValidator(self.mock_host_controller)

    def test_can_validate_given_xml_data_fixture(self):
        """fab.tests.data.data_fixture_validator_test  Can validate a given XML data fixture"""

        self.mock_feedback.comment('Validating data fixture: /path/to/data/fixture.xml')
        self.mock_host_controller.run('xmllint --noout --memory /path/to/data/fixture.xml')
        self.mox.ReplayAll()

        self.data_fixture_validator.validate('/path/to/data/fixture.xml')