예제 #1
0
    def test_get_fields(self):
        fields = Book.get_fields()

        self.assertEqual(len(fields), 7)
        self.assertEqual(
            sorted(list(fields.keys())),
            sorted([
                'id', 'content', 'name', 'author', 'date_created', 'price',
                'quantity'
            ]))
예제 #2
0
    def test_get_fields(self):
        fields = Book.get_fields()

        self.assertEqual(len(fields), 7)
        self.assertEqual(
            sorted(list(fields.keys())),
            sorted([
                "id", "content", "name", "author", "date_created", "price",
                "quantity"
            ]),
        )