Skip to content

Commit

Permalink
Added tox.ini and some basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cattz committed Jan 30, 2018
1 parent fac63fe commit d41a4e6
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
Empty file added tests/__init__.py
Empty file.
44 changes: 44 additions & 0 deletions tests/test_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from atlassian import Jira, Confluence, Stash, Portfolio, Bamboo
import os


BAMBOO_URL = os.environ.get('BAMBOO_URL', 'http://localhost:8085')
JIRA_URL = os.environ.get('BAMBOO_URL', 'http://localhost:8080')
CONFLUENCE_URL = os.environ.get('BAMBOO_URL', 'http://localhost:8090')
STASH_URL = os.environ.get('BAMBOO_URL', 'http://localhost:7990')

ATLASSIAN_USER = os.environ.get('ATLASSIAN_USER', 'admin')
ATLASSIAN_PASSWORD = os.environ.get('ATLASSIAN_PASSWORD', 'admin')


class TestBasic(object):

def test_init_jira(self):
jira = Jira(
url=JIRA_URL,
username=ATLASSIAN_USER,
password=ATLASSIAN_PASSWORD
)

def test_init_confluence(self):
confluence = Confluence(
url=CONFLUENCE_URL,
username=ATLASSIAN_USER,
password=ATLASSIAN_PASSWORD
)

def test_init_stash(self):
stash = Stash(
url=STASH_URL,
username=ATLASSIAN_USER,
password=ATLASSIAN_PASSWORD
)

def test_init_bamboo(self):
bamboo = Bamboo(
url=BAMBOO_URL,
username=ATLASSIAN_USER,
password=ATLASSIAN_PASSWORD
)


5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[tox]
envlist = py3
[testenv]
deps = pytest
commands = pytest -v

0 comments on commit d41a4e6

Please sign in to comment.