mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
# This file is part of wger Workout Manager.
|
|
#
|
|
# wger Workout Manager is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# wger Workout Manager is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# wger
|
|
from wger.core.models import DaysOfWeek
|
|
from wger.core.tests import api_base_test
|
|
from wger.core.tests.base_testcase import WgerTestCase
|
|
|
|
|
|
class DaysOfWeekRepresentationTestCase(WgerTestCase):
|
|
"""
|
|
Test the representation of a model
|
|
"""
|
|
|
|
def test_representation(self):
|
|
"""
|
|
Test that the representation of an object is correct
|
|
"""
|
|
self.assertEqual(f'{DaysOfWeek.objects.get(pk=1)}', 'Monday')
|
|
|
|
|
|
class DaysOfWeekApiTestCase(api_base_test.ApiBaseResourceTestCase):
|
|
"""
|
|
Tests the days of week resource
|
|
"""
|
|
|
|
pk = 1
|
|
resource = DaysOfWeek
|
|
private_resource = False
|