Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Skiepko committed May 9, 2017
1 parent 4e698fd commit a757313
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@mock.patch('dila.data.add_resource')
def test_add_resource(add_resource):
dila.application.resources.add_resource('Next')
dila.application.add_resource('Next')
assert add_resource.mock_calls == [
mock.call(
'Next',
Expand All @@ -53,6 +53,14 @@ def test_get_resources_evaluates_iterator(get_resources):
assert result == []


@mock.patch('dila.data.get_resource')
def test_get_resource(get_resource):
get_resource.return_value = 'data_result'
result = application.get_resource('pk')
get_resource.assert_called_with('pk')
assert result == 'data_result'


@mock.patch('dila.data.get_resource')
def test_get_translated_string(get_resource):
get_resource.return_value = 'data_result'
Expand Down

0 comments on commit a757313

Please sign in to comment.