File: fakes.py

package info (click to toggle)
python-wikkid 0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 728 kB
  • sloc: python: 3,051; makefile: 12
file content (29 lines) | stat: -rw-r--r-- 708 bytes parent folder | download | duplicates (2)
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
27
28
29
#
# Copyright (C) 2010 Wikkid Developers.
#
# This software is licensed under the GNU Affero General Public License
# version 3 (see the file LICENSE).

"""The wikkid tests and test only code."""

from zope.interface import implementer

from wikkid.interface.user import IUser


class TestUserFactory(object):
    """Right now, user factories don't do anything."""


@implementer(IUser)
class TestUser(object):
    """A test user that implements the interface."""

    def __init__(self, email, display_name):
        self.email = email
        self.display_name = display_name
        self.committer_id = "{0} <{1}>".format(email, display_name)


class TestRequest(object):
    """A fake request object."""