summaryrefslogtreecommitdiff
path: root/iniherit/test_cli.py
blob: 84df1e34944ed37df29bedfb2be64aaaee17cd12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2014/04/15
# copy: (C) Copyright 2014-EOT Cadit Inc., All Rights Reserved.
#------------------------------------------------------------------------------

import unittest
import six

from .cli import flatten

#------------------------------------------------------------------------------
class TestIniheritCli(unittest.TestCase):

  #----------------------------------------------------------------------------
  def test_optionKeyCaseStaysConstant(self):
    src = '''\
[app]
someURL = http://example.com/PATH

'''

    buf = six.StringIO()
    flatten(six.StringIO(src), buf)
    out = buf.getvalue()

    self.assertMultiLineEqual(out, src)

#------------------------------------------------------------------------------
# end of $Id$
#------------------------------------------------------------------------------