-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on programs and program enrolments.
Updated the setup.py to the new version number ready for pushing.
- Loading branch information
Keith
committed
Jun 8, 2017
1 parent
0a475e4
commit 020c608
Showing
6 changed files
with
54 additions
and
6 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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from dotmailer.program_enrolments import ProgramEnrolment | ||
|
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
from dotmailer.programs import Program | ||
|
||
|
||
def test_get_all(connection): | ||
response = Program.get_all() | ||
assert type(response) is list | ||
if len(response) > 0: | ||
assert response[0].id is not None | ||
|
||
|
||
def test_get_id(connection): | ||
response = Program.get_all() | ||
if len(response) < 1: | ||
assert False, 'Unable to test as no programs exists' | ||
id = response[0].id | ||
program = Program.get(id) | ||
assert type(program) is Program | ||
assert program.name == response[0].name | ||
assert program.status == response[0].status | ||
assert program.date_created == response[0].date_created | ||
|
||
|
||
def test_invalid_get_id(connection): | ||
with pytest.raises(Exception): | ||
Program.get(0) |
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