File: test_model_group.py

package info (click to toggle)
python-marathon 0.13.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 460 kB
  • sloc: python: 1,969; makefile: 185; sh: 58
file content (17 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from marathon.models.group import MarathonGroup
import unittest


class MarathonGroupTest(unittest.TestCase):

    def test_from_json_parses_root_group(self):
        data = {
                   "id": "/",
                   "groups": [
                       {"id": "/foo", "apps": []},
                       {"id": "/bla", "apps": []},
                   ],
                   "apps": []
        }
        group = MarathonGroup().from_json(data)
        self.assertEqual("/", group.id)