Skip to content
Permalink
1e7b314f38
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (13 sloc) 478 Bytes
import unittest
from userfactory import UserFactory
class TestUserFactory(unittest.TestCase):
def setUp(self):
self.__factory = UserFactory()
def test_factory_creates_staff(self):
staff = self.__factory.factory("staff")
role = staff.get_role()
self.assertEqual(role, "staff")
def test_factory_creates_user(self):
staff = self.__factory.factory("user")
role = staff.get_role()
self.assertEqual(role, "user")