From c988cd39dc71c1a81c5403961e6eb17fc0f5586b Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Fri, 4 Jan 2019 21:02:59 +0000 Subject: [PATCH 1/2] added unit test: test_create_test_configuration.py Ref issue #35 --- apitester/test_create_test_configuration.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 apitester/test_create_test_configuration.py diff --git a/apitester/test_create_test_configuration.py b/apitester/test_create_test_configuration.py new file mode 100644 index 0000000..a16198e --- /dev/null +++ b/apitester/test_create_test_configuration.py @@ -0,0 +1,12 @@ +from django.test import TestCase +from runtests.models import TestConfiguration + +class NewTestConfigurationTestCase(TestCase): + ''' + Create a new (empty) TestConfiguration model. + ''' + def test_create_test_configuration(self): + test_config = TestConfiguration(owner_id=1, name='Fred', + api_version='3.0.1') + test_config.save() + return test_config From 7b51b6bfed056d635955e5b2790a49e5c39d0d55 Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Mon, 7 Jan 2019 13:52:10 +0000 Subject: [PATCH 2/2] corrected api version 3.0.1=> 3.1.0 --- apitester/test_create_test_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apitester/test_create_test_configuration.py b/apitester/test_create_test_configuration.py index a16198e..a161539 100644 --- a/apitester/test_create_test_configuration.py +++ b/apitester/test_create_test_configuration.py @@ -7,6 +7,6 @@ class NewTestConfigurationTestCase(TestCase): ''' def test_create_test_configuration(self): test_config = TestConfiguration(owner_id=1, name='Fred', - api_version='3.0.1') + api_version='3.1.0') test_config.save() return test_config