From 6c339a14170ea77926bc8eb47bd7e61c80db4a42 Mon Sep 17 00:00:00 2001 From: Raphael Pierzina Date: Sun, 8 Nov 2015 23:05:32 +0100 Subject: [PATCH] Implement a basic test with cookies.bake() --- tests/test_cookiecutter_generation.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/test_cookiecutter_generation.py diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py new file mode 100644 index 00000000..e7658809 --- /dev/null +++ b/tests/test_cookiecutter_generation.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +import pytest + +@pytest.fixture +def context(): + return { + "project_name": "My Test Project", + "repo_name": "my_test_project", + "author_name": "Test Author", + "email": "test@example.com", + "description": "A short description of the project.", + "domain_name": "example.com", + "version": "0.1.0", + "timezone": "UTC", + "now": "2015/01/13", + "year": "2015" + } + + +def test_default_configuration(cookies, context): + result = cookies.bake(extra_context=context) + assert result.exit_code == 0