|
| 1 | +# Copyright 2019 Silverbackhq |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# Third Party Library |
| 16 | +from django.test import TestCase |
| 17 | +from django.shortcuts import reverse |
| 18 | + |
| 19 | +# Local Library |
| 20 | +from app.tests.testing_base import TestingBase |
| 21 | + |
| 22 | + |
| 23 | +class TestFeed(TestCase): |
| 24 | + |
| 25 | + def setUp(self): |
| 26 | + tb = TestingBase() |
| 27 | + tb.uninstall() |
| 28 | + tb.install({ |
| 29 | + "app_name": "Silverback", |
| 30 | + |
| 31 | + "app_url": "http://silverback.com", |
| 32 | + "admin_username": "admin", |
| 33 | + "admin_email": "[email protected]", |
| 34 | + "admin_password": "$h12345678H$" |
| 35 | + }) |
| 36 | + |
| 37 | + def tearDown(self): |
| 38 | + tb = TestingBase() |
| 39 | + tb.uninstall() |
| 40 | + |
| 41 | + def test_get_atom(self): |
| 42 | + response = self.client.get(reverse("app.web.history_atom")) |
| 43 | + self.assertEqual(response.status_code, 200) |
| 44 | + |
| 45 | + def test_get_rss(self): |
| 46 | + response = self.client.get(reverse("app.web.history_rss")) |
| 47 | + self.assertEqual(response.status_code, 200) |
0 commit comments