Skip to content

Commit

Permalink
Added test for MapBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
atikhonov-avito authored and buglloc committed Apr 17, 2018
1 parent 6f0edbc commit 8250894
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/directives/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,19 @@ def test_block_find_not_flat():
assert_equals(len(finds), 1)
assert_equals([x.name for x in finds], ['directive'])
assert_equals([x.args[0] for x in finds], ['1'])


def test_block_map():
config = '''
map $some_var $some_other_var {
a b;
default c;
}
'''

directive = _get_parsed(config)
assert_is_instance(directive, MapBlock)
assert_true(directive.is_block)
assert_false(directive.self_context)
assert_true(directive.provide_variables)
assert_equals(directive.variable, 'some_other_var')

0 comments on commit 8250894

Please sign in to comment.