lint, style, and Windows fixes

This commit is contained in:
Vernon Cole 2017-10-02 09:48:27 -06:00
parent 18357ac59d
commit 22792e56cc
No known key found for this signature in database
GPG key ID: C4FE8A79AB2E140C

View file

@ -8,6 +8,7 @@ from __future__ import absolute_import
import os
# Import Salt Testing Libs
from tests.support.paths import TMP
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
@ -17,9 +18,8 @@ from tests.support.mock import (
# Import Salt Libs
import salt.utils.sdb as sdb
import salt.exceptions
TEMP_DATABASE_FILE = '/tmp/salt-tests-tmpdir/test_sdb.sqlite'
TEMP_DATABASE_FILE = os.path.join(TMP, 'test_sdb.sqlite')
SDB_OPTS = {
'extension_modules': '',
@ -57,9 +57,7 @@ class SdbTestCase(TestCase, LoaderModuleMockMixin):
# test with SQLite database write and read
def test_sqlite_get_found(self):
expected = dict(name='testone',
number=46,
)
expected = {b'name': b'testone', b'number': 46}
sdb.sdb_set('sdb://test_sdb_data/test1', expected, SDB_OPTS)
resp = sdb.sdb_get('sdb://test_sdb_data/test1', SDB_OPTS)
self.assertEqual(resp, expected)