Completed
Pull Request — master (#694)
by Eric
02:14
created

test_custom_serializer()   A

Complexity

Conditions 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
"""
5
test_real_hooks_acceptance
6
--------------------------
7
8
Additional tests for `cookiecutter.hooks` module.
9
"""
10
11
import os
12
13
from .support import AbstractAcceptanceTest
14
15
16
class TestSerializationAcceptance(AbstractAcceptanceTest):
17
18
    def _repo_id(self):
19
        return 'test-serialization-acceptance'
20
21
    def test_cross_hooks_context(self):
22
        """
23
        context can be updated from a hook to another
24
        """
25
        template = 'crosshooks'
26
        self.run(template)
27
        assert os.path.exists(os.path.join(self.project_dir, template))
28
29
    def test_custom_serializer(self):
30
        """
31
        context can be updated from a hook to another
32
        """
33
        template = 'custom_serializer'
34
        self.run(template)
35
        assert os.path.exists(os.path.join(self.project_dir, 'COPY'))
36