import unittest

from ..inmemory import (
    DataValueInMemory, DataStreamInMemory, DataStoreNestableInMemory)
from .mixintestcase import (
    MixInValueTestCase, MixInStreamTestCase, MixInNestableAutoValueTestCase)


class TestDataValueInMemory(MixInValueTestCase, unittest.TestCase):

    dstype = DataValueInMemory

    def test_set_get_singleton(self):
        obj = object()
        self.ds.set(obj)
        self.assertTrue(self.ds.get() is obj)


class TestDataStreamInMemory(MixInStreamTestCase, unittest.TestCase):
    dstype = DataStreamInMemory


class TestDataStoreNestableInMemory(MixInNestableAutoValueTestCase,
                                    unittest.TestCase):
    dstype = DataStoreNestableInMemory

@@ -73,24 +73,28 @@
 eamInMemory,
+%0A   
  DataStoreNe
@@ -107,16 +107,52 @@
 InMemory
+, DataStoreNestableInMemoryAutoValue
 )%0Afrom .
@@ -214,24 +214,51 @@
 eamTestCase,
+%0A    MixInNestableTestCase,
  MixInNestab
@@ -664,33 +664,24 @@
 ixInNestable
-AutoValue
 TestCase,%0A  
@@ -765,16 +765,208 @@
 estableInMemory%0A
+%0A%0Aclass TestDataStoreNestableInMemoryAutoValue(MixInNestableAutoValueTestCase,%0A                                             unittest.TestCase):%0A    dstype = DataStoreNestableInMemoryAutoValue%0A

Fix and add tests for datastore.inmemory