~sproaty/whyteboard/development

« back to all changes in this revision

Viewing changes to whyteboard/test/fakewidgets/html.py

  • Committer: Steven Sproat
  • Date: 2010-08-01 02:28:50 UTC
  • Revision ID: sproaty@gmail.com-20100801022850-ck1u3xq873fu38wq
setup, moved tests around

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# -*- coding: utf-8 -*-
 
3
 
 
4
"""
 
5
Fake wx.html module.
 
6
 
 
7
"""
 
8
 
 
9
from core import Control, Window
 
10
 
 
11
class HtmlWindow(Window):
 
12
    def __init__(self, *args, **kwds):
 
13
        Window.__init__(self, *args, **kwds)
 
14
 
 
15
    def LoadUrl(self, url):
 
16
        pass
 
17
    def SetPage(self, page):
 
18
        self.page = page
 
19
 
 
20
    def __getattr__(self, attr):
 
21
        """Just fake any other methods"""
 
22
        self.calls.append(attr)
 
23
        return lambda *args, **kwds: None
 
24
 
 
25
class HtmlHelpController(object):
 
26
    def AddBook(self, book):
 
27
        pass
 
28
 
 
29
import wx.html
 
30
wx.html.__dict__.update(locals())
 
31
assert wx.html.HtmlWindow == HtmlWindow
 
 
b'\\ No newline at end of file'