Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
4006_deffer_project-email/test_Email_db.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
41 lines (31 sloc)
1.12 KB
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
from unittest import TestCase | |
from tools import email_client as f | |
class Test(TestCase): | |
def test_ins_usr(self): | |
import Email_db as u | |
usr_1 = f('John@mail.com', 'sports', '1') | |
w = u.ins_usr(usr_1) | |
self.assertEqual(w, 0) | |
class Test(TestCase): | |
def test_user_info(self): | |
import Email_db as u | |
usr_1 = f('John@mail.com', 'sports', '1') # class tool.client | |
usr_4 = u.user_info('John@mail.com') # class list | |
self.assertNotEqual(type(usr_4), type(usr_1)) | |
class Test(TestCase): | |
def test_alluser_info(self): | |
import Email_db as u | |
usr_1 = f('John@mail.com', 'sports', '1') # class tool.client | |
usr_4 = u.Alluser_info() # class list | |
self.assertNotEqual(type(usr_4), type(usr_1)) | |
class Test(TestCase): | |
def test_upd_options(self): | |
import Email_db as u | |
w = u.upd_options('John@mail.com', 'sports') | |
self.assertEqual(w, 0) | |
class Test(TestCase): | |
def test_remove_usr(self): | |
import Email_db as u | |
usr_1 = f('John@mail.com', 'sports', '1') | |
w=u.remove_usr(usr_1) | |
self.assertEqual(w, 0) |