Example #1
0
    def test_info_announcement(self):
        """
        Running the info method should show us the current announcement
        """
        announce.set_announcement('Test announcement')
        r = self._call('info')
        assert isinstance(r['announcement'], unicode)
        assert r['announcement'] == 'Test announcement'

        announce.set_announcement('New announcement')
        r = self._call('info')
        assert isinstance(r['announcement'], unicode)
        assert r['announcement'] == 'New announcement'

        announce.unset_announcement()
        r = self._call('info')
        assert not r.get('announcement')
Example #2
0
def test_info_announcement(api):
    """
    Running the info method should show us the current announcement
    """
    announce.set_announcement("Test announcement")
    r = api("info")
    assert isinstance(r["announcement"], unicode)
    assert r["announcement"] == "Test announcement"

    announce.set_announcement("New announcement")
    r = api("info")
    assert isinstance(r["announcement"], unicode)
    assert r["announcement"] == "New announcement"

    announce.unset_announcement()
    r = api("info")
    assert not r.get("announcement")
def test_info_announcement(api):
    """
    Running the info method should show us the current announcement
    """
    announce.set_announcement('Test announcement')
    r = api('info')
    assert isinstance(r['announcement'], unicode)
    assert r['announcement'] == 'Test announcement'

    announce.set_announcement('New announcement')
    r = api('info')
    assert isinstance(r['announcement'], unicode)
    assert r['announcement'] == 'New announcement'

    announce.unset_announcement()
    r = api('info')
    assert not r.get('announcement')
Example #4
0
def test_announcement(website):
    """
    We should always see the current announcement.
    """
    announce.set_announcement('Test announcement')
    r = website.get('/syntax-checker')
    assert r.status == '200 OK'
    assert 'Test announcement' in r.data

    announce.set_announcement('New announcement')
    r = website.get('/syntax-checker')
    assert r.status == '200 OK'
    assert 'New announcement' in r.data

    announce.unset_announcement()
    r = website.get('/syntax-checker')
    assert r.status == '200 OK'
    assert 'nnouncement' not in r.data
Example #5
0
    def test_announcement(self):
        """
        We should always see the current announcement.
        """
        announce.set_announcement('Test announcement')
        r = self.app.get('/syntax-checker')
        assert r.status == '200 OK'
        assert 'Test announcement' in r.data

        announce.set_announcement('New announcement')
        r = self.app.get('/syntax-checker')
        assert r.status == '200 OK'
        assert 'New announcement' in r.data

        announce.unset_announcement()
        r = self.app.get('/syntax-checker')
        assert r.status == '200 OK'
        assert 'nnouncement' not in r.data