Exemplo n.º 1
0
    def test_validate(self):
        """Validate function work as expected"""
        self.tearDown()
        # First check that we DONT validate a clear DOCK
        flag, message = DOCK.validate()
        self.assertTrue(message is not None, 'No reason for failure given')

        message = 'Validation expected to fail on a cleared DOCK.'
        self.assertEquals(flag, False, message)

        # Now check we DO validate a populated DOCK
        populate_dock(DOCK)
        flag = DOCK.validate()
        message = (
            'Validation expected to pass on a populated dock with selections.')
        self.assertTrue(flag, message)
Exemplo n.º 2
0
    def test_set_ok_button_status(self):
        """OK button changes properly according to self.dock validity."""
        # First check that we ok ISNT enabled on a clear self.dock
        self.tearDown()
        flag, message = self.dock._validate_question_area()

        self.assertIsNotNone(message, 'No reason for failure given')
        message = 'Validation expected to fail on a cleared self.dock.'
        self.assertFalse(flag, message)

        # Now check OK IS enabled on a populated self.dock
        populate_dock(self.dock)
        flag = self.dock._validate_question_area()
        message = ('Validation expected to pass on a populated self.dock with '
                   'selections.')
        self.assertTrue(flag, message)
Exemplo n.º 3
0
    def test_set_ok_button_status(self):
        """OK button changes properly according to DOCK validity"""
        # First check that we ok ISNT enabled on a clear DOCK
        self.tearDown()
        flag, message = DOCK.validate()

        self.assertTrue(message is not None, 'No reason for failure given')
        message = 'Validation expected to fail on a cleared DOCK.'
        self.assertEquals(flag, False, message)

        # Now check OK IS enabled on a populated DOCK
        populate_dock(DOCK)
        flag = DOCK.validate()
        message = (
            'Validation expected to pass on a populated DOCK with selections.')
        self.assertTrue(flag, message)
Exemplo n.º 4
0
    def test_validate(self):
        """Validate function work as expected."""
        self.tearDown()
        # First check that we DON'T validate a clear self.dock
        flag, message = self.dock._validate_question_area()
        self.assertIsNotNone(message, 'No reason for failure given')

        message = 'Validation expected to fail on a cleared self.dock.'
        self.assertFalse(flag, message)

        # Now check we DO validate a populated self.dock
        populate_dock(self.dock)
        flag = self.dock._validate_question_area()
        message = (
            'Validation expected to pass on a populated dock with selections.')
        self.assertTrue(flag, message)
Exemplo n.º 5
0
    def test_validate(self):
        """Validate function work as expected."""
        self.tearDown()
        # First check that we DON'T validate a clear self.dock
        flag, message = self.dock._validate_question_area()
        self.assertIsNotNone(message, 'No reason for failure given')

        message = 'Validation expected to fail on a cleared self.dock.'
        self.assertFalse(flag, message)

        # Now check we DO validate a populated self.dock
        populate_dock(self.dock)
        flag = self.dock._validate_question_area()
        message = (
            'Validation expected to pass on a populated dock with selections.')
        self.assertTrue(flag, message)
Exemplo n.º 6
0
    def test_set_ok_button_status(self):
        """OK button changes properly according to DOCK validity"""
        # First check that we ok ISNT enabled on a clear DOCK
        self.tearDown()
        flag, message = DOCK.validate()

        self.assertTrue(message is not None, 'No reason for failure given')
        message = 'Validation expected to fail on a cleared DOCK.'
        self.assertEquals(flag, False, message)

        # Now check OK IS enabled on a populated DOCK
        populate_dock(DOCK)
        flag = DOCK.validate()
        message = (
            'Validation expected to pass on a populated DOCK with selections.')
        self.assertTrue(flag, message)
Exemplo n.º 7
0
    def test_validate(self):
        """Validate function work as expected"""
        self.tearDown()
        # First check that we DONT validate a clear DOCK
        flag, message = DOCK.validate()
        self.assertTrue(message is not None, 'No reason for failure given')

        message = 'Validation expected to fail on a cleared DOCK.'
        self.assertEquals(flag, False, message)

        # Now check we DO validate a populated DOCK
        populate_dock(DOCK)
        flag = DOCK.validate()
        message = (
            'Validation expected to pass on a populated dock with selections.')
        self.assertTrue(flag, message)
Exemplo n.º 8
0
    def test_set_ok_button_status(self):
        """OK button changes properly according to self.dock validity."""
        # First check that we ok ISNT enabled on a clear self.dock
        self.tearDown()
        flag, message = self.dock._validate_question_area()

        self.assertIsNotNone(message, 'No reason for failure given')
        message = 'Validation expected to fail on a cleared self.dock.'
        self.assertFalse(flag, message)

        # Now check OK IS enabled on a populated self.dock
        populate_dock(self.dock)
        flag = self.dock._validate_question_area()
        message = (
            'Validation expected to pass on a populated self.dock with '
            'selections.')
        self.assertTrue(flag, message)