diff --git a/app/app/calc.py b/app/app/calc.py new file mode 100644 index 0000000..6367cfc --- /dev/null +++ b/app/app/calc.py @@ -0,0 +1,6 @@ +""" +Calculator functions +""" + +def add(x, y): + return x + y diff --git a/app/app/tests.py b/app/app/tests.py new file mode 100644 index 0000000..6ac392a --- /dev/null +++ b/app/app/tests.py @@ -0,0 +1,14 @@ +""" +Sample tests +""" + +from django.test import SimpleTestCase + +from app import calc + +class CalcTests(SimpleTestCase): + + def test_add_numbers(self): + res = calc.add(5, 6) + + self.assertEqual(res, 11)