Skip to content

Commit d41a4e6

Browse files
committed
Added tox.ini and some basic tests
1 parent fac63fe commit d41a4e6

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

tests/__init__.py

Whitespace-only changes.

tests/test_base.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
from atlassian import Jira, Confluence, Stash, Portfolio, Bamboo
2+
import os
3+
4+
5+
BAMBOO_URL = os.environ.get('BAMBOO_URL', 'http://localhost:8085')
6+
JIRA_URL = os.environ.get('BAMBOO_URL', 'http://localhost:8080')
7+
CONFLUENCE_URL = os.environ.get('BAMBOO_URL', 'http://localhost:8090')
8+
STASH_URL = os.environ.get('BAMBOO_URL', 'http://localhost:7990')
9+
10+
ATLASSIAN_USER = os.environ.get('ATLASSIAN_USER', 'admin')
11+
ATLASSIAN_PASSWORD = os.environ.get('ATLASSIAN_PASSWORD', 'admin')
12+
13+
14+
class TestBasic(object):
15+
16+
def test_init_jira(self):
17+
jira = Jira(
18+
url=JIRA_URL,
19+
username=ATLASSIAN_USER,
20+
password=ATLASSIAN_PASSWORD
21+
)
22+
23+
def test_init_confluence(self):
24+
confluence = Confluence(
25+
url=CONFLUENCE_URL,
26+
username=ATLASSIAN_USER,
27+
password=ATLASSIAN_PASSWORD
28+
)
29+
30+
def test_init_stash(self):
31+
stash = Stash(
32+
url=STASH_URL,
33+
username=ATLASSIAN_USER,
34+
password=ATLASSIAN_PASSWORD
35+
)
36+
37+
def test_init_bamboo(self):
38+
bamboo = Bamboo(
39+
url=BAMBOO_URL,
40+
username=ATLASSIAN_USER,
41+
password=ATLASSIAN_PASSWORD
42+
)
43+
44+

tox.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tox]
2+
envlist = py3
3+
[testenv]
4+
deps = pytest
5+
commands = pytest -v

0 commit comments

Comments
 (0)