Add from_dict

This commit is contained in:
Jason Paryani
2013-09-03 01:00:52 -07:00
parent c900690b96
commit 83e30f5a30
2 changed files with 46 additions and 2 deletions

View File

@@ -25,6 +25,11 @@ def test_which_builder(addressbook):
assert bob.employment.which() == "unemployed"
with pytest.raises(ValueError):
addresses.which()
with pytest.raises(ValueError):
addresses.which()
def test_which_reader(addressbook):
def writeAddressBook(fd):
message = capnp._MallocMessageBuilder()
@@ -53,6 +58,11 @@ def test_which_reader(addressbook):
bob = people[1]
assert bob.employment.which() == "unemployed"
with pytest.raises(ValueError):
addresses.which()
with pytest.raises(ValueError):
addresses.which()
def test_builder_set(addressbook):
person = addressbook.Person.new_message()