def get_attrs_as_string(self): """ FIXME: Find a better was to do this. >>> node = DocNode(attrs={'foo':"bar", "no":123}) >>> node.get_attrs_as_string() 'foo="bar" no=123' >>> node = DocNode(attrs={"foo":'bar', "no":"ABC"}) >>> node.get_attrs_as_string() 'foo="bar" no="ABC"' """ return dict2string(self.attrs)
def test_basic3(self): self.assertEqual( dict2string({"foo":'bar', "no":"ABC"}), 'foo="bar" no="ABC"' )
def test_basic2(self): self.assertEqual( dict2string({'foo':"bar", "no":123}), 'foo="bar" no=123' )
def test_basic(self): self.assertEqual( dict2string({'key':'value'}), 'key="value"' )
def test_basic3(self): self.assertEqual(dict2string({ "foo": 'bar', "no": "ABC" }), 'foo="bar" no="ABC"')
def test_basic2(self): self.assertEqual(dict2string({ 'foo': "bar", "no": 123 }), 'foo="bar" no=123')
def test_basic(self): self.assertEqual(dict2string({'key': 'value'}), 'key="value"')
def test_basic3(self): self.assertEqual( dict2string({"foo":'bar', "no":"ABC"}), "foo='bar' no='ABC'" )