DGEFP / DGEFP/DGEFP_BE

Adding default testing for the backend

Open
#4 1 comment 0 reactions 1 assignee Claimed by @Vardhu View on GitHub
enhancement good first issue
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Adding the test cases would help in managing backend code

**Describe the solution you'd like**
built in testing in django
ex :
from django.test import TestCase
from myapp.models import Animal


class AnimalTestCase(TestCase):
def setUp(self):
Animal.objects.create(name="lion", sound="roar")
Animal.objects.create(name="cat", sound="meow")

def test_animals_can_speak(self):
"""Animals that can speak are correctly identified"""
lion = Animal.objects.get(name="lion")
cat = Animal.objects.get(name="cat")
self.assertEqual(lion.speak(), 'The lion says "roar"')
self.assertEqual(cat.speak(), 'The cat says "meow"')

**Describe alternatives you've considered**
or use a package like pytest

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.