Skip to content

Commit

Permalink
Merge pull request #1 from brighthive/tests
Browse files Browse the repository at this point in the history
chore: Move tests from MCI repo
  • Loading branch information
reginafcompton authored May 31, 2019
2 parents d12c0b8 + 07af1e9 commit 971a840
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# vscode configuration
.vscode/

# python artifacts
*.py[abc]
**/__pycache__

# pytest artifacts
**/.pytest_cache

# sample data provided by customer (DO NOT COMMIT)
**/samples
**/scripts
**/*.sql

# package distribution
*.egg-info
dist/*
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
expects = "*"

[packages]
flask = "*"
Expand Down
16 changes: 12 additions & 4 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added tests/__init__.py
Empty file.
19 changes: 19 additions & 0 deletions tests/test_mci_datastore.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""MCI Datastore Unit Tests
A collection of unit tests for the MCI database module.
"""

import pytest
from datetime import datetime
from expects import expect, be, equal
from mci_database.db.models import Gender, Individual


class TestMCIDataStore(object):
"""MCI database unit tests."""

def test_database_operations(self):
# def test_database_operations(self, database):
# add datasets to datastore
pass
15 changes: 15 additions & 0 deletions tests/test_mci_id_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""MCI ID Factory Unit Tests
A collection of unit tests for the MCI ID module.
"""

from expects import expect, be, equal
from mci_database.id_factory import MasterClientIDFactory


class TestIDFactory(object):
def test_create_unique_mci_id(self):
id1 = MasterClientIDFactory.get_id()
id2 = MasterClientIDFactory.get_id()
expect(id1).to_not(equal(id2))

0 comments on commit 971a840

Please sign in to comment.