Passed
Push — master ( 00d837...bc5250 )
by Jace
49s
created

TestGetConfig   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 7
1
# pylint: disable=no-self-use,misplaced-comparison-constant
2
3
import pytest
4
5
from memegen.settings import Config, get_config
6
7
8
class TestGetConfig:
9
10
    def test_get_valid(self):
11
        config = get_config('prod')
12
13
        assert issubclass(config, Config)
14
        assert 'prod' == config.ENV
15
16
    def test_get_none(self):
17
        with pytest.raises(AssertionError):
18
            get_config('')
19
20
    def test_get_unknown(self):
21
        with pytest.raises(AssertionError):
22
            get_config('not_a_valid_config')
23