from twisted.trial import unittest

from zope.interface.verify import verifyObject

from opennsa.interface import INSIProvider, INSIRequester

from opennsa import registry
from opennsa import aggregator
from opennsa.backends.common import genericbackend




class InterfaceTest(unittest.TestCase):

    def setUp(self):
        self.sr = registry.ServiceRegistry()


    def testGenericBackend(self):
        simple_backend = genericbackend.GenericBackend('network', None, None, None)
        verifyObject(INSIProvider, simple_backend)
#    testGenericBackend.skip = 'Interface undergoing overhaul'


    def testAggregator(self):

        aggr = aggregator.Aggregator('network', None, self.sr, None, None)

        verifyObject(INSIProvider, simple_backend)

    testAggregator.skip = "skip"


@@ -140,37 +140,8 @@
 er%0A%0A
-from opennsa import registry%0A
 from
@@ -267,76 +267,8 @@
 ):%0A%0A
-    def setUp(self):%0A        self.sr = registry.ServiceRegistry()%0A%0A%0A
     
@@ -436,71 +436,8 @@
 nd)%0A
-#    testGenericBackend.skip = 'Interface undergoing overhaul'%0A
 %0A%0A  
@@ -464,17 +464,16 @@
 (self):%0A
-%0A
         
@@ -522,15 +522,12 @@
 ne, 
-self.sr
+None
 , No
@@ -536,17 +536,16 @@
 , None)%0A
-%0A
         
@@ -571,33 +571,22 @@
 ovider, 
-simple_backend
+aggr
 )%0A
-%0A
     test
@@ -608,11 +608,40 @@
  = %22skip
+, aggregator not complete yet
 %22%0A%0A

update interface test