0
|
1 |
#
|
|
2 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
# All rights reserved.
|
|
4 |
# This component and the accompanying materials are made available
|
|
5 |
# under the terms of "Eclipse Public License v1.0"
|
|
6 |
# which accompanies this distribution, and is available
|
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
#
|
|
9 |
# Initial Contributors:
|
|
10 |
# Nokia Corporation - initial contribution.
|
|
11 |
#
|
|
12 |
# Contributors:
|
|
13 |
#
|
|
14 |
# Description:
|
|
15 |
#
|
|
16 |
|
|
17 |
import unittest, os
|
|
18 |
import pkg_resources
|
3
|
19 |
|
0
|
20 |
from cone.public.exceptions import NotSupportedException
|
|
21 |
from contentplugin import contentml
|
|
22 |
|
|
23 |
class TestCreateContentPlugin(unittest.TestCase):
|
|
24 |
def test_create_content_impl(self):
|
|
25 |
imp = contentml.ContentImpl('test.content',None)
|
|
26 |
pass
|
|
27 |
|
|
28 |
class TestContentImplementation(unittest.TestCase):
|
|
29 |
def setUp(self):
|
|
30 |
self.imp = contentml.ContentImpl('test.content',None)
|
|
31 |
pass
|
|
32 |
|
|
33 |
def test_content_filter(self):
|
|
34 |
files = ['aaa.txt', 'bbb.txt']
|
|
35 |
filesfunc = lambda x: x.lower() in [file.lower() for file in files]
|
|
36 |
self.assertEquals(filesfunc('aaa'), False)
|
|
37 |
self.assertEquals(filesfunc('AAA'), False)
|
|
38 |
self.assertEquals(filesfunc('AAA.txt'), True)
|
|
39 |
self.assertEquals(filesfunc('aaa.txt'), True)
|
|
40 |
|
|
41 |
if __name__ == '__main__':
|
|
42 |
unittest.main()
|