def testCase(self): root = glyph.get(self.endpoint.url) self.assertEqual(root.foo(1,1), 2) self.assertEqual(root.bar(1,1), 1) self.assertEqual(root.baz(1,2,3), [1,2,3]) self.assertEqual(root.baz(c=3,b=2,a=1), [1,2,3]) self.assertEqual(root.baz(1,c=3,b=2), [1,2,3])
def testCase(self): index = glyph.get(self.endpoint.url) a,b = index.unit()() self.assertEqual(a.v, 0) self.assertEqual(b.v, 1)
def testCase(self): root = glyph.get(self.endpoint.url) result_a = root.Test(0) self.assertEqual(result_a.value, 0) result_b = root.Test(0) self.assertEqual(result_b.value, 0) self.assertNotEqual(result_a.self.url(), result_b.self.url())
def testCase(self): root = glyph.get(self.endpoint.url) self.assertEqual(root.foo(1, 1), 2) self.assertEqual(root.bar(1, 1), 1) self.assertEqual(root.baz(1, 2, 3), [1, 2, 3]) self.assertEqual(root.baz(c=3, b=2, a=1), [1, 2, 3]) self.assertEqual(root.baz(1, c=3, b=2), [1, 2, 3])
def testCase(self): index = glyph.get(self.endpoint.url) self.assertEqual(index.Test().get(), 1) self.assertEqual(index.Other(4).v,4)
def testCase(self): index = glyph.get(self.endpoint.url) self.assertEqual(index.Test().get(), 1) self.assertEqual(index.Other(4).v, 4)
def testCase(self): result = glyph.get(self.endpoint.url) self.assertEqual(result.value, 0) result = result.inc(n=5) self.assertEqual(result.value, 5)
def testCase(self): result = glyph.get(self.endpoint.url) self.assertEqual(result['zero'](), 0) result = result['make']()
def testCase(self): result = glyph.get(self.endpoint.url) with self.assertRaises(StandardError): self.result.nope()
def testCase(self): result = glyph.get(self.endpoint.url) self.assertEqual(result.value(), 0) self.assertEqual(result.add2(), 2)
def testCase(self): result = glyph.get(self.endpoint.url) with self.assertRaises(AttributeError): self.result.clsm() with self.assertRaises(AttributeError): self.result.static()
def testCase(self): result_a = glyph.get(self.endpoint.url) self.assertEqual(result_a.value(), 0) result_b = result_a.make(0) self.assertEqual(result_b.value(), 0) self.assertNotEqual(result_a.self.url(), result_b.self.url())
def testCase(self): root = glyph.get(self.endpoint.url) result = root.Test(0) self.assertEqual(result.value(), 0) result = root.Test(2) self.assertEqual(result.value(), 2)
def testCase(self): result = glyph.get(self.endpoint.url) result = result.get() self.assertEqual(result.double(), self.value)
def testCase(self): root = glyph.get(self.endpoint.url) self.assertEqual(root.foo, 123)
def testCase(self): root = glyph.get(self.endpoint.url) b = glyph.blob(BytesIO("TEST"), content_type="Test") b2 = root.do_blob(b) self.assertEqual(b2.fh.read(), "test") self.assertEqual(b2.content_type, "Test")
def testCase(self): index = glyph.get(self.endpoint.url) a, b = index.unit()() self.assertEqual(a.v, 0) self.assertEqual(b.v, 1)
def testCase(self): result = glyph.get(self.endpoint.url) self.assertEqual(result.get(), None)
import hyperglyph import sys s = hyperglyph.get(sys.argv[1]) print s q= s.Queue(u'butt') print q q.push(u'butts') print q.pop()