Update libjuju
[osm/N2VC.git] / modules / libjuju / tests / unit / test_client.py
index 7828cf3..e9fde8e 100644 (file)
@@ -4,16 +4,14 @@ Tests for generated client code
 """
 
 import mock
-import pytest
 
 
 from juju.client import client
 
 
-
 def test_basics():
     assert client.CLIENTS
-    for i in range(1,5):  # Assert versions 1-4 in client dict
+    for i in range(1, 5):  # Assert versions 1-4 in client dict
         assert str(i) in client.CLIENTS
 
 
@@ -21,5 +19,10 @@ def test_from_connection():
     connection = mock.Mock()
     connection.facades = {"Action": 2}
     action_facade = client.ActionFacade.from_connection(connection)
+    assert action_facade
+
 
-    
+def test_to_json():
+    uml = client.UserModelList([client.UserModel()])
+    assert uml.to_json() == ('{"user-models": [{"last-connection": null, '
+                             '"model": null}]}')