This commit is contained in:
James Socol 2010-02-10 17:32:02 -08:00
Родитель 82d584edb3
Коммит 6eda0391d4
7 изменённых файлов: 626 добавлений и 55 удалений

Просмотреть файл

@ -5,19 +5,3 @@ unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,262 @@
[
{
"pk": 185510,
"model": "sumo.forumthread",
"fields": {
"userName": "Bob (anon)",
"hits": 267,
"smiley": "",
"hash": "ffcc8752a1499e0f7f9203892e45e8a7",
"description": "Error Log Code 203 Plugins installed: [+]Default Plug-in RealJukebox Netscape Plugin RealPlayer(tm) LiveConnect-Enabled Plug-In 6.0.12.69 Google Update Shockwave Flash 10.0 r12 iTunes Detector Plu",
"title": "Google toolbar doesn't install. ",
"commentDate": 1224139823,
"data": "Error Log Code 203\n\n!! Plugins installed: \n\n*-Default Plug-in\r\n*RealJukebox Netscape Plugin\r\n*RealPlayer(tm) LiveConnect-Enabled Plug-In\r\n*6.0.12.69\r\n*Google Update\r\n*Shockwave Flash 10.0 r12\r\n*iTunes Detector Plug-in\r\n*Picasa plugin\r\n*Google Updater pluginhttp://pack.google.com/\r\n*Rhapsody Player Engine Plugin\r\n*MetaStream 3 Plugin r4\r\n*Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)\r\n*Adobe PDF Plug-In For Firefox and Netscape\r\n*The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.\r\n*DRM Netscape Network Object\r\n*Npdsplay dll\r\n*DRM Store Netscape Plugin",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 3.0.3 Operating system: Windows XP",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Bob (not registered)-0-ffcc8752a1@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 126164,
"model": "sumo.forumthread",
"fields": {
"userName": "\u00c3\u0081lber (anon)",
"hits": 706,
"smiley": "",
"hash": "c809d9164bc22d8baadc93f82edcc560",
"description": "When the mouse pointer hovers over the flash player, mouse wheel does not scroll until the pointer is outside the player. If I click in the player, I have to click outside before I can scroll again.",
"title": "Firefox stops scrolling when mouse is over (some) Flash players ",
"commentDate": 1218082627,
"data": "When the mouse pointer hovers over the flash player, mouse wheel does not scroll until the pointer is outside the player. If I click in the player, I have to click outside before I can scroll again.\r\n\r\nFirst it only happened with some versions of JW Player... Now it also happens with all YouTube players.\r\n\r\n \u00c2\u00b7 Adobe Flash Player (Shockwave Flash, as listed at FF Plugins) 9.0 r124.\r\n \u00c2\u00b7 Firefox 3.0, Windows XP SP3, standard mouse.\r\n * It doesn't affect IE, Safari or Flock.\r\n * It happens in safe mode.\r\n * It also happens with FF 3.1 Alpha 1 and FF Portable 3.0, but NOT with FF Portable 2.0.\r\n \u00c2\u00b7 I have already uninstalled/reinstalled Flash 9.0.\r\n \u00c2\u00b7 I have also tried uninstalling Flash 9 and installing 10 Beta. It didn't work, so now it's 9 again.\r\n \u00c2\u00b7 I don't know why the YouTube behavior changed. This morning it started occuring in embedded players; this evening all players were affected.\r\n \u00c2\u00b7 Also, the need to click outside before scrolling did only appear after I re-installed Flash.\r\n \u00c2\u00b7 I didn't tamper (much) with my system yesterday.\r\n \u00c2\u00b7 Google tells me it was a classic bug of FF2 in Linux, solved with FF3. I didn't find anybody with this problem on Windows.\n\n!! Extensions installed: \n\nGreasemonkey, Stylish, Adblock Plus, etc., but AFAIK safe mode rules them out...\n\n!! Plugins installed: \n\n*-IE Tab Plug-in for Mozilla/Firefox\r\n*Default Plug-in\r\n*npdivxplayerplugin\r\n*DivX Web Player version 1.4.0.233\r\n*The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.\r\n*RealPlayer(tm) LiveConnect-Enabled Plug-In\r\n*6.0.12.46\r\n*Adobe PDF Plug-In For Firefox and Netscape\r\n*Yahoo! activeX Plug-in Bridge\r\n*Office Plugin for Netscape Navigator\r\n*Adobe Shockwave for Director Netscape plug-in, version 10.1\r\n*WindizUpdate for Firefox, Mozilla, Opera and Netscape; version 2.0.2006.517. For details, visit windizupdate.com\r\n*Shockwave Flash 9.0 r124\r\n*iTunes Detector Plug-in\r\n*1.0.30401.0\r\n*Virtual Earth 3D 2.00071113001 plugin for Mozilla\r\n*Windows Presentation Foundation (WPF) plug-in for Mozilla browsers\r\n*NPVeohVersion4 plugin\r\n*Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)\r\n*DRM Netscape Network Object\r\n*Npdsplay dll\r\n*DRM Store Netscape Plugin",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 3.0.1 Operating system: Windows XP",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "\u00c3\u0081lber (not registered)-0-c809d9164b@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 30857,
"model": "sumo.forumthread",
"fields": {
"userName": "Bill (anon)",
"hits": 163,
"smiley": "",
"hash": "6e476756896552466e6c28cc7b243609",
"description": "looked all over for instruction and preferences that might control it. Extensions installed: I don't know Plugins installed: [+]Netscape Navigator Default Plug-in Runs Java applets using",
"title": "How can I turn off the audio news and comercials when I open yahoo",
"commentDate": 1206812870,
"data": "looked all over for instruction and preferences that might control it.\n\n!! Extensions installed: \n\nI don't know\n\n!! Plugins installed: \n\n*-Netscape Navigator Default Plug-in\r\n*Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run version test: Java Information.\r\n*The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.\r\n*Shockwave Flash 9.0 r115\r\n*The Flip4Mac WMV Plugin allows you to view Windows Media content using QuickTime.\r\n*Netscape plugin that plays Rhapsody content\r\n*Plugin that plays RealMedia content\r\n*Verified Download Plugin\r\n*Macromedia Shockwave for Director Netscape plug-in, version 10.1.1\r\n*Java 1.3.1 Plug-in\r\n*Java 1.3.1 Plug-in (CFM)",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 2.0.0.13 Operating system: PPC Mac OS X Mach-O",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Bill (not registered)-0-6e47675689@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 185508,
"model": "sumo.forumthread",
"fields": {
"userName": "Anonymous",
"hits": 384,
"smiley": "",
"hash": "1b02b79c99d6d343af5a377fc45a11cf",
"description": "I have not yet installed Firefox 3, because of its design. I would very much like to be able to make FF 3 look exactly like FF 2, including the separator line between the menubar and the navigation ba",
"title": "Default theme",
"commentDate": 1224139652,
"data": "I have not yet installed Firefox 3, because of its design. I would very much like to be able to make FF 3 look exactly like FF 2, including the separator line between the menubar and the navigation bar which is missing in FF3 (yes, I must be mad), and the default icons/buttons in FF2. Is there a way to make this happen?\n\n!! Plugins installed: \n\n*-Keep your drivers up-to-date with Driver Agent. Designed for Firefox, Opera, Mozilla and Netscape; version 2.2008.9.10\r\n*Default Plug-in\r\n*Adobe PDF Plug-In For Firefox and Netscape\r\n*Office Plugin for Netscape Navigator\r\n*Shockwave Flash 9.0 r124\r\n*Java Plug-in 1.6.0_01 for Netscape Navigator (DLL Helper)",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 2.0.0.16 Operating system: Windows Vista",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "l",
"message_id": "Anonymous-0-1b02b79c99@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 32255,
"model": "sumo.forumthread",
"fields": {
"userName": "Peter Stich (anon)",
"hits": 117,
"smiley": "",
"hash": "9ba61a98bcaccd21b813e8669e947bbc",
"description": "Re-downloading Firefox. Plugins installed: [+]Netscape Navigator Default Plug-in Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run ver",
"title": "Firefox locks up when opening bookmarks imported from Safari.",
"commentDate": 1207030161,
"data": "Re-downloading Firefox.\n\n!! Plugins installed: \n\n*-Netscape Navigator Default Plug-in\r\n*Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run version test: Java Information.\r\n*The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.\r\n*Verified Download Plugin\r\n*Shockwave Flash 9.0 r115",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 2.0.0.12 Operating system: Intel Mac OS X",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Peter Stich (not registered)-0-9ba61a98bc@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 34564,
"model": "sumo.forumthread",
"fields": {
"userName": "Frank (anon)",
"hits": 116,
"smiley": "",
"hash": "cec6593987c45398dfb205507794357f",
"description": "It is a site I need for work and it will work for the people who use IE, but nothing else. Plugins installed: [+]Runs Java applets using the latest installed versions of Java. For more information",
"title": "I cannot download a page that is using virtualearth. It stops when downloading t3.tiles.virtualearth.",
"commentDate": 1207435205,
"data": "It is a site I need for work and it will work for the people who use IE, but nothing else.\n\n!! Plugins installed: \n\n*-Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run version test: Test Your JVM.\r\n*Netscape Navigator Default Plug-in\r\n*The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.\r\n*The Flip4Mac WMV Plugin allows you to view Windows Media content using QuickTime.\r\n*Scorch Plugin for viewing Sibelius(tm) music scores http://www.sibelius.com\r\n*Shockwave Flash 9.0 r47\r\n*Verified Download Plugin",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 2.0.0.7 Operating system: Intel Mac OS X",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Frank (not registered)-0-cec6593987@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 18852,
"model": "sumo.forumthread",
"fields": {
"userName": "Emma (anon)",
"hits": 125,
"smiley": "",
"hash": "61b5168ecece790cfc0ed951ddb2e8f0",
"description": "When I use the Address bar to search for something (eg gmail) it goes to www.quickbrowsersearch.com which is a useless search engine. My computer at work searches though google when I do the same th",
"title": "Searching from the address bar results in www.quickbrowsersearch.com",
"commentDate": 1204264402,
"data": "When I use the Address bar to search for something (eg gmail) it goes to www.quickbrowsersearch.com which is a useless search engine. My computer at work searches though google when I do the same thing. I can't figure out why it does this. So annoying!\n\n!! Plugins installed: \n\n*-Shockwave Flash 9.0 r47\r\n*Default Plug-in\r\n*Yahoo Application State Plugin\r\n*Windows Presentation Foundation (WPF) plug-in for Mozilla browsers\r\n*RealJukebox Netscape Plugin\r\n*RealPlayer(tm) LiveConnect-Enabled Plug-In\r\n*6.0.12.1662\r\n*Yahoo! activeX Plug-in Bridge\r\n*Java Plug-in 1.6.0_03 for Netscape Navigator (DLL Helper)\r\n*Adobe PDF Plug-In For Firefox and Netscape\r\n*The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.\r\n*Npdsplay dll\r\n*DRM Netscape Network Object\r\n*DRM Store Netscape Plugin",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 2.0.0.12 Operating system: Windows XP",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Emma (not registered)-0-61b5168ece@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 8289,
"model": "sumo.forumthread",
"fields": {
"userName": "Andreas Gustafsson (anon)",
"hits": 422,
"smiley": "",
"hash": "a9db94cb9fe225c5e7b96fc007419a48",
"description": "I'm using the Linux version of Firefox. When I use the Ctrl+W shortcut to close a tab, if and only if there happens to be exactly one tab, it doesn't just close the tab, but quits the entir",
"title": "Making Ctrl+W close the tab and only close the tab",
"commentDate": 1201972097,
"data": "I'm using the Linux version of Firefox. When I use the Ctrl+W\r\nshortcut to close a tab, if and only if there happens to be exactly\r\none tab, it doesn't just close the tab, but quits the entire browser.\r\nI find this highly illogical and inconvenient - it means I have to count\r\nmy tabs every time I want to close one in order to make sure I don't\r\naccidentally quit my browser! Is there any way to fix this?\n\n!! Extensions installed: \n\nFirebug",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 2.0.0.11 Operating system: NetBSD",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Andreas Gustafsson (not registered)-0-a9db94cb9f@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 8288,
"model": "sumo.forumthread",
"fields": {
"userName": "Steve LaCAze (anon)",
"hits": 292,
"smiley": "",
"hash": "a7f7fc894be3f7864e40fd77eb0a0597",
"description": "I have tried adding a bookmark at the top but was unable to seperate the book marks into seperate listsings. I want a bookmark for ceratain things and another for the rest. Thanks, Steve To organi",
"title": "Can you have more that one bookmark on Firefox and seperate your bookmarked items",
"commentDate": 1201972020,
"data": "I have tried adding a bookmark at the top but was unable to seperate the book marks into seperate listsings.\r\n\r\nI want a bookmark for ceratain things and another for the rest.\r\n\r\nThanks,\r\nSteve",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 1.0 Operating system: Windows XP",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Steve LaCAze (not registered)-0-a7f7fc894b@support.mozilla.com",
"objectType": "forum"
}
},
{
"pk": 89582,
"model": "sumo.forumthread",
"fields": {
"userName": "Earl (anon)",
"hits": 193,
"smiley": "",
"hash": "41ad82ddcf794711527b26246dc3b491",
"description": "Was able to stream yesterday (6/28/03) with FireFox 2.0, Installed FireFox 3.0, could not stream the same station today (6/2/08). Went back to Windows IE 7.0...this worked. Extensions installed:",
"title": "Lost Streaming ability for a radio station (KFI640)",
"commentDate": 1214764015,
"data": "Was able to stream yesterday (6/28/03) with FireFox 2.0, Installed FireFox 3.0, could not stream the same station today (6/2/08). Went back to Windows IE 7.0...this worked.\n\n!! Extensions installed: \n\nNone\n\n!! Plugins installed: \n\n*-Default Plug-in\r\n*The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.\r\n*Adobe PDF Plug-In For Firefox and Netscape\r\n*np-mswmp\r\n*DjVu Plug-In(external version 6.1.1.1574)\r\n*Mozilla ActiveX control and plugin module\r\n*Shockwave Flash 9.0 r115\r\n*iTunes Detector Plug-in\r\n*1.0.30401.0\r\n*Google Updater pluginhttp://pack.google.com/\r\n*Java Plug-in 1.6.0_05 for Netscape Navigator (DLL Helper)",
"average": "0.0000",
"object": "1",
"votes": 0,
"comment_rating": null,
"summary": "Firefox version: 3.0 Operating system: Windows Vista",
"user_ip": "10.2.81.4",
"points": "0.00",
"parentId": 0,
"in_reply_to": "",
"type": "n",
"message_id": "Earl (not registered)-0-41ad82ddcf@support.mozilla.com",
"objectType": "forum"
}
}
]

Просмотреть файл

@ -24,24 +24,24 @@ class ForumThread(ModelBase):
threadId = models.AutoField(primary_key=True)
object = models.CharField(max_length=255)
objectType = models.CharField(max_length=32)
parentId = models.IntegerField()
parentId = models.IntegerField(null=True)
userName = models.CharField(max_length=200)
commentDate = models.IntegerField()
hits = models.IntegerField()
type = models.CharField(max_length=1)
points = models.DecimalField(max_digits=8, decimal_places=2)
votes = models.IntegerField()
average = models.DecimalField(max_digits=8, decimal_places=4)
title = models.CharField(max_length=255)
data = models.TextField()
description = models.CharField(max_length=200)
hash = models.CharField(max_length=32)
user_ip = models.CharField(max_length=15)
summary = models.CharField(max_length=240)
smiley = models.CharField(max_length=80)
message_id = models.CharField(max_length=128)
in_reply_to = models.CharField(max_length=128)
comment_rating = models.IntegerField()
commentDate = models.IntegerField(null=True)
hits = models.IntegerField(null=True)
type = models.CharField(max_length=1, null=True)
points = models.DecimalField(max_digits=8, decimal_places=2, null=True)
votes = models.IntegerField(null=True)
average = models.DecimalField(max_digits=8, decimal_places=4, null=True)
title = models.CharField(max_length=255, null=True)
data = models.TextField(null=True)
description = models.CharField(max_length=200, null=True)
hash = models.CharField(max_length=32, null=True)
user_ip = models.CharField(max_length=15, null=True)
summary = models.CharField(max_length=240, null=True)
smiley = models.CharField(max_length=80, null=True)
message_id = models.CharField(max_length=128, null=True)
in_reply_to = models.CharField(max_length=128, null=True)
comment_rating = models.IntegerField(null=True)
class Meta:
db_table = "tiki_comments"
@ -63,29 +63,29 @@ class ForumThread(ModelBase):
class WikiPage(ModelBase):
page_id = models.AutoField(primary_key=True)
pageName = models.CharField(max_length=160, unique=True)
hits = models.IntegerField()
data = models.TextField()
description = models.CharField(max_length=200)
hits = models.IntegerField(null=True)
data = models.TextField(null=True)
description = models.CharField(max_length=200, null=True)
desc_auto = models.CharField(max_length=1)
lastModif = models.IntegerField()
comment = models.CharField(max_length=200)
version = models.IntegerField()
user = models.CharField(max_length=200)
ip = models.CharField(max_length=15)
flag = models.CharField(max_length=1)
points = models.IntegerField()
votes = models.IntegerField()
cache = models.TextField()
wiki_cache = models.IntegerField()
cache_timestamp = models.IntegerField()
pageRank = models.DecimalField(max_digits=4, decimal_places=3)
creator = models.CharField(max_length=200)
page_size = models.PositiveIntegerField()
lang = models.CharField(max_length=16)
lockedby = models.CharField(max_length=200)
is_html = models.BooleanField()
created = models.IntegerField()
keywords = models.TextField()
lastModif = models.IntegerField(null=True)
comment = models.CharField(max_length=200, null=True)
version = models.IntegerField(null=True,default=0)
user = models.CharField(max_length=200, null=True)
ip = models.CharField(max_length=15, null=True)
flag = models.CharField(max_length=1, null=True)
points = models.IntegerField(null=True)
votes = models.IntegerField(null=True)
cache = models.TextField(null=True)
wiki_cache = models.IntegerField(null=True)
cache_timestamp = models.IntegerField(null=True)
pageRank = models.DecimalField(max_digits=4, decimal_places=3, null=True)
creator = models.CharField(max_length=200, null=True)
page_size = models.PositiveIntegerField(null=True)
lang = models.CharField(max_length=16, null=True)
lockedby = models.CharField(max_length=200, null=True)
is_html = models.NullBooleanField(null=True)
created = models.IntegerField(null=True)
keywords = models.TextField(null=True)
class Meta:
db_table = "tiki_pages"

Просмотреть файл

Просмотреть файл

@ -0,0 +1,21 @@
from django import test
from nose.tools import eq_
from sumo.models import ForumThread, WikiPage
class TestForumModel(test.TestCase):
fixtures = ['threads.json']
def test_get_url(self):
f = ForumThread.objects.create(pk=12345,object=1)
eq_(f.get_url(), '/en/forum/1/12345')
class TestWikiPage(test.TestCase):
fixtures = ['pages.json']
def test_get_url(self):
w = WikiPage.objects.create(pk=1, lang='en', pageName='My Test Page')
eq_(w.get_url(), '/en/kb/My Test Page')

Просмотреть файл

@ -103,6 +103,8 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'sumo',
'search',
)
TEST_RUNNER = 'test_utils.runner.RadicalTestSuiteRunner'