forked from mblahnik/Schedulizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_createAccount.py
32 lines (19 loc) · 1.07 KB
/
test_createAccount.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from unittest import TestCase
class TestCreateAccount(TestCase):
def setup(self):
"""
When the createAccount command is entered, it takes two arguments:
-Account name
-title
If the account being created already exists in the database an error message is displayed
"""
def test_command_createAccount_success(self):
self.assertEquals(self.ui.command("createAccount accountName title"), "Account successfully created")
def test_command_createAccount_no_title(self):
self.assertEquals(self.ui.command("createAccount accountName "), "Need to specify a title")
def test_command_createAccount_no_name(self):
self.assertEquals(self.ui.command("createAccount title "), "Need to specify a name")
def test_command_createAccount_no_args(self):
self.assertEquals(self.ui.command("createAccount title "), "Please enter a name and title")
def test_command_createAccount_already_exists(self):
self.assertEquals(self.ui.command("createAccount accountName title "), "Account already exists")