Beispiel #1
0
    def test_get_releases(self):
        """Assert correct return value from get_releases()."""
        request = testing.DummyRequest(user=base.DummyUser('guest'))

        releases = server.get_releases(request)

        assert releases == models.Release.all_releases()
Beispiel #2
0
    def test_no_user(self):
        """Test when there is not a user."""
        request = testing.DummyRequest(user=base.DummyUser('guest'))
        request.db = self.db

        # The first argument isn't used, so just set it to None.
        groups = server.groupfinder(None, request)

        self.assertEqual(groups, ['group:packager'])