1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 14:54:22 +00:00

🧪 Add SophonInstanceDetailsTestCase

This commit is contained in:
Steffo 2021-10-28 12:42:40 +02:00
parent 14faaad7dc
commit 98014204bc

View file

@ -3,6 +3,7 @@ import contextlib
import typing as t import typing as t
import django.urls.exceptions import django.urls.exceptions
import pkg_resources
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.urls import reverse from django.urls import reverse
from rest_framework.response import Response from rest_framework.response import Response
@ -527,6 +528,16 @@ class ResearchGroupTestCase(WriteSophonTestCase):
# TODO: Test join and leave # TODO: Test join and leave
# TODO: Test instance details
class SophonInstanceDetailsTestCase(BetterAPITestCase):
def test_details_200(self):
response = self.client.get("/api/core/instance/")
self.assertEqual(response.status_code, 200)
self.assertData(response.data, {
"name": "Sophon",
"description": None,
"theme": "sophon",
"version": pkg_resources.get_distribution("sophon").version,
})
# TODO: Test some more code # TODO: Test some more code