def test_to_query_string_file(self):
     d = IODict({
         'ok': '1',
         'test': '2',
         'page': '3',
         'lib': 'python benedict',
         'author': 'Fabio Caccamo'
     })
     filepath = self.output_path('test_to_query_string_file.qs')
     d.to_query_string(filepath=filepath)
     self.assertFileExists(filepath)
     self.assertEqual(d, IODict.from_query_string(filepath))
 def test_to_query_string(self):
     data = {
         'ok': '1',
         'test': '2',
         'page': '3',
         'lib': 'python benedict',
         'author': 'Fabio Caccamo'
     }
     d = IODict({
         'ok': '1',
         'test': '2',
         'page': '3',
         'lib': 'python benedict',
         'author': 'Fabio Caccamo'
     })
     s = d.to_query_string()
     self.assertEqual(d, IODict.from_query_string(s))