Skip to content

Commit

Permalink
Test Travis orchestration
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaughn Coetzee committed May 3, 2019
1 parent 1816f93 commit 96036f8
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions test/unit/test_tnetdatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,3 @@
# from functools import wraps
# import pytest
from tnetserver import tnetdatabase


def test_simple_mocking(mocker):
"""Hello world."""
mock_db_service = mocker.patch(
"other_code.services.db_service",
autospec=True)

mock_data = [(0, "fake row", 0.0)]

mock_db_service.return_value = mock_data

print("\n(Calling count_service with the DB mocked out...)")

# count_service("foo")
c = 1

mock_db_service.assert_called_with("foo")

print('yes')
assert c == 1


def test_db_set_invalid_path():
"""Test db path."""
assert tnetdatabase.db_initialise('/fake/path') is False

0 comments on commit 96036f8

Please sign in to comment.