示例#1
0
    def test_request_is_other(self):
        """The function should return '' request is something else, like testing."""
        u = Update.query.all()[0]
        u.request = UpdateRequest.testing

        a = util.push_to_batched_or_stable_button(None, u)

        self.assertEqual(a, '')
示例#2
0
    def test_severity_is_urgent(self):
        """The function should render a Push to Stable button if the severity is urgent."""
        u = Update.query.all()[0]
        u.severity = UpdateSeverity.urgent

        a = util.push_to_batched_or_stable_button(None, u)

        self.assertTrue('id="stable"' in a)
        self.assertTrue('</span> Push to Stable</a>' in a)
示例#3
0
    def test_request_is_stable(self):
        """The function should render a Push to Batched button if the request is stable."""
        u = Update.query.all()[0]
        u.request = UpdateRequest.stable

        a = util.push_to_batched_or_stable_button(None, u)

        self.assertTrue('id="batched"' in a)
        self.assertTrue('</span> Push to Batched</a>' in a)