コード例 #1
0
 def test_04_init_and_update_json_test(self):
     c = SDCollection(title="My test collection", href="http://example.org")
     assert c.title == "My test collection"
     assert c.href == "http://example.org"
     c.title = "Altered Title"
     assert c.title == "Altered Title"
     j = c.to_json()
     j_data = json.loads(j)
     assert j_data['title'] == "Altered Title"
     assert j_data['href'] == "http://example.org"
     assert j_data['accept'] == []
コード例 #2
0
 def test_04_init_and_update_json_test(self):
     c = SDCollection(title="My test collection", href="http://example.org")
     assert c.title == "My test collection"
     assert c.href == "http://example.org"
     c.title = "Altered Title"
     assert c.title == "Altered Title"
     j = c.to_json()
     j_data = json.loads(j)
     assert j_data['title'] == "Altered Title"
     assert j_data['href'] == "http://example.org"
     assert j_data['accept'] == []
コード例 #3
0
 def test_03_init_and_update(self):
     c = SDCollection(title="My test collection", href="http://example.org")
     assert c.title == "My test collection"
     assert c.href == "http://example.org"
     c.title = "Altered Title"
     assert c.title == "Altered Title"
コード例 #4
0
 def test_01_blank_init(self):
     c = SDCollection()
     assert c.title == None
     assert c.href == None
コード例 #5
0
 def test_03_init_and_update(self):
     c = SDCollection(title="My test collection", href="http://example.org")
     assert c.title == "My test collection"
     assert c.href == "http://example.org"
     c.title = "Altered Title"
     assert c.title == "Altered Title"
コード例 #6
0
 def test_02_init(self):
     c = SDCollection(title="My test collection", href="http://example.org")
     assert c.title == "My test collection"
     assert c.href == "http://example.org"