From c54a75c1fa0a09c2c002574aea713f0a3c2f433e Mon Sep 17 00:00:00 2001 From: DominikDrabik Date: Fri, 7 Jun 2024 22:33:20 +0200 Subject: [PATCH] Something is wrong with the test --- app/app/calc.py | 6 ++++++ app/app/tests.py | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 app/app/calc.py create mode 100644 app/app/tests.py diff --git a/app/app/calc.py b/app/app/calc.py new file mode 100644 index 0000000..ca0e6f7 --- /dev/null +++ b/app/app/calc.py @@ -0,0 +1,6 @@ +""" +Calculator functions +""" + +def add_numbers(x, y): + return x + y \ No newline at end of file diff --git a/app/app/tests.py b/app/app/tests.py new file mode 100644 index 0000000..12d557e --- /dev/null +++ b/app/app/tests.py @@ -0,0 +1,13 @@ +""" +Sample tests +""" + +from django.test import SimpleTestCase + +from app import calc + +class CalcTests(SimpleTestCase): + def test_add_numbers(self): + """Test that two numbers are added together""" + self.assertEqual(calc.add(3, 8), 11) + \ No newline at end of file