This repository has been archived by the owner on Aug 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: testing: test_label for file sources
Signed-off-by: John Andersen <[email protected]>
- Loading branch information
Showing
5 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
from dffml.util.testing.source import SourceTest | ||
import unittest | ||
|
||
from dffml.util.testing.source import FileSourceTest | ||
from dffml.util.asynctestcase import AsyncTestCase | ||
|
||
from .custom_sqlite import CustomSQLiteSourceConfig, CustomSQLiteSource | ||
|
||
|
||
class TestJSONSource(SourceTest, AsyncTestCase): | ||
async def setUpFile(self, fileobj): | ||
return | ||
fileobj.write(b"{}") | ||
fileobj.seek(0) | ||
|
||
async def setUpSource(self, fileobj): | ||
class TestJSONSource(FileSourceTest, AsyncTestCase): | ||
async def setUpSource(self): | ||
return CustomSQLiteSource( | ||
CustomSQLiteSourceConfig(filename=fileobj.name) | ||
CustomSQLiteSourceConfig(filename=self.testfile) | ||
) | ||
|
||
@unittest.skip("Labels not implemented") | ||
async def test_label(self): | ||
""" | ||
Labels not implemented | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters