Beispiel #1
0
    def test_build(self):
        users = fake.build(self.schema, "[email protected]")

        with self.assertRaises(AttributeError):
            users.unknown()

        with self.assertRaises(TypeError):
            users.get()

        users.get(id=1)

        users.get(id=1, name="string")
Beispiel #2
0
    def test_build(self):
        users = fake.build(self.schema, '[email protected]')

        with self.assertRaises(AttributeError):
            users.unknown()

        with self.assertRaises(TypeError):
            users.get()

        users.get(id=1)

        users.get(id=1, name='string')
Beispiel #3
0
    def test_build_unknown_service(self):
        with self.assertRaises(ValueError):
            fake.build(self.schema, "unknown")

        with self.assertRaises(ValueError):
            fake.build(self.schema, "[email protected]")
Beispiel #4
0
    def test_build_unknown_service(self):
        with self.assertRaises(ValueError):
            fake.build(self.schema, 'unknown')

        with self.assertRaises(ValueError):
            fake.build(self.schema, '[email protected]')