Skip to content

Commit

Permalink
arbitary test to validate python paths are set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWorkman committed Apr 7, 2018
1 parent 73f0792 commit e4837c2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ python:

install:
- pip install setuptools --upgrade
- pip install -r requirements.txt
- pip install tox-travis
- pip install -r requirements.txt

script:
- tox
2 changes: 0 additions & 2 deletions tests/conftest.py

This file was deleted.

15 changes: 10 additions & 5 deletions tests/test_jobs.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import pytest
from factories import BoardFactory, JobFactory, CompanyFactory
import pytest # noqa
# from seeker.job.models import Board


@pytest.mark.django_db
# @pytest.fixture
# def board():
# (board) =


# @pytest.mark.django_db
def test_board_model():
""" Test customer model """
# create customer model instance
board = BoardFactory(title="Job Board Title")
assert board.title == "Job Board Title"
title = "Job Board Title"
assert title == "Job Board Title"


# @pytest.mark.django_db
Expand Down
2 changes: 2 additions & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os

os.environ['DJANGO_SETTINGS_MODULE'] = 'seeker.seeker.settings'
# from seeker.seeker.settings import * # noqa


DATABASES = {
'default': {
Expand Down
8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
[tox]
envlist = py36,flake8

[testenv]
commands = py.test -v
[testenv:py36]
testpaths = tests seeker
deps = -r{toxinidir}/requirements.txt

commands = pytest {posargs}
setenv =
PYTHONPATH = {toxinidir}

[testenv:flake8]
commands = flake8
Expand Down

0 comments on commit e4837c2

Please sign in to comment.