background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Урок для начинающих по PyTest #7.1 | Пишем простенький и элегантный билдер для генерации данных"

input logo icon
Table of contents
|

Table of contents

0:00
Пишем простенький и элегантный билдер для генерации данных
0:10
Что же мы будем рассматривать в рамках урока?
0:30
Разбираемся с идеей видео
3:50
Приступаем к написанию билдера
4:20
Что такое builder?
6:02
Реализовываем первые кусочки builder
11:30
Описываем localize билдер в рамках другого билдера
17:30
Тестируем наш билдер
22:20
Интегрируем наш билдер в тесты
24:40
Проверям работу билдера в тестах
29:08
Работа с localize билдером
38:00
До новых встреч
Video tags
|

Video tags

пайтон
питон
пайтест
pytest
python
для начинающих
уроки
автоматизация
автотесты
тестирование
generation
генерация
тестовых
данных
генерация тестовых данных в тестах
builders
pytest builder
python3
generate
билдер
builder
generate
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:00
guys hello everyone hello everyone and what else is there
00:00:03
today 1 1 and there will always be something
00:00:06
about our test,
00:00:08
let’s say this video will be about
00:00:11
the topic that torments us all very
00:00:14
much and
00:00:17
testing sometimes makes you sad
00:00:19
and you need to figure out a separate person
00:00:20
who will generate the test backbone
00:00:22
and today we will watch a video about them,
00:00:25
what exactly is the idea,
00:00:28
that is, not all life tests us with
00:00:31
only one get request and that’s right,
00:00:33
we go in then Susan here our our
00:00:35
cases grandfather we sent received the
00:00:37
word so we will draw a loop for with received
00:00:40
given we checked the status code 200 ok and but
00:00:45
here the right was in the lead, our object requires
00:00:47
no, but in addition to sin requests, we
00:00:50
also have post requests to divide requests along the path
00:00:54
to, that is, something needs to be updated and
00:00:56
we need to generate this data, that is,
00:01:00
here it is shown just farig here
00:01:02
we have just an example of just
00:01:04
some object, some player up to the
00:01:07
year of the user, that is, I have a
00:01:11
localization balance status, that is, how no one
00:01:14
writes it for example in English and
00:01:15
Russian and a google.com avatar command,
00:01:21
that’s basically all the most common object
00:01:24
that you would use for your tests,
00:01:27
yes, I used it when the one received on
00:01:29
the knee is needed right today and
00:01:32
yesterday than it was, there is nothing left
00:01:35
except to do something similar to
00:01:37
this, that is, there the first tests
00:01:39
were simply thrown into this flyer, so we
00:01:42
sent status and just here in the morning there is
00:01:44
a hook,
00:01:45
write the status, yes, everything has changed, checked with
00:01:48
all statuses, the next 300 are created, copied like
00:01:51
this, pasted, and then
00:01:54
what’s next, it’s without, for example,
00:01:56
check the balance, check, and then
00:01:59
again copied the attack on delivered
00:02:03
because I like so much lysis
00:02:05
to check everything and now we look at our
00:02:08
pelvis casey they look like this,
00:02:10
that is, it’s just constant
00:02:12
duplication of code
00:02:13
constantly and duplication of code and,
00:02:16
in principle, very very very complex
00:02:19
support because it’s not a struggle at
00:02:21
some point something changes to
00:02:23
conquering, that’s just changing in the
00:02:25
structure the steeper bell changes from you
00:02:28
will need to walk around the entire project, it’s
00:02:29
all a matter of playing on that is, this
00:02:31
technique works if you
00:02:33
write cases in Chinese once and I
00:02:37
yesterday and the meeting, yes, that is, you don’t need
00:02:39
to support if you are writing the same age to
00:02:42
aggro on investments my paths to
00:02:45
the future that is, it’s not worth doing like this
00:02:48
it will be very difficult to support
00:02:51
not unreadable that is, the sunrise will be
00:02:53
simply cluttered by some Jason to whom
00:02:55
Jason’s quality so today we will
00:02:59
see how you can generate this
00:03:01
data convenient for you convenient for everyone and
00:03:04
according to at least it’s difficult to treat yourself with the support of
00:03:07
these data structures,
00:03:10
so why did I choose just such a
00:03:13
structure?
00:03:26
inside the object and
00:03:29
burned down with the tone of itself, in fact, we
00:03:32
will have an object like this, so
00:03:39
what next, well, in principle, the avatar
00:03:42
is a little later underwear
00:03:45
salted salted so let's start
00:03:49
writing so first we
00:03:52
need our daddy,
00:03:54
this is so beautiful
00:03:57
so when we call it a real disaster I'm
00:04:01
not talking about Taras
00:04:03
generators
00:04:04
generators of memes and let's create our first
00:04:08
generator let's call it player some kind of
00:04:13
liner we've already decided on this plugin and
00:04:16
let's start with writing our class, that
00:04:19
is, we will have builder until
00:04:22
I'll briefly tell you what a builder is,
00:04:24
this is such a concept, yes it will come into play
00:04:27
programming when
00:04:29
it’s a certain class that by default by
00:04:33
default it’s like a value without a number,
00:04:38
just and I’m from the field to an empty clean field
00:04:41
with such small beautiful grass and there’s a
00:04:44
bunch of things standing there in a beautiful
00:04:47
suit, he lived there, a helmet with a hammer and a
00:04:49
bunch of material, that’s it let's drink and come
00:04:52
because you don't need to take them house boon doc
00:04:54
rambam is putting the house in this clearing
00:04:56
just the
00:04:58
simplest house four walls
00:05:01
on top some kind of wooden roof
00:05:04
he's so good
00:05:07
changes please the roof he's different
00:05:09
well changed the roof he's red then
00:05:12
change the wall then on the green one there are two windows and he
00:05:15
made another door, okay, the city did all this to
00:05:18
the main one, you gave him the house, you Weasley, but at the
00:05:21
same time, the builder, he remained, he
00:05:24
continued on, this guy stands with milk in the field, he’s on
00:05:26
duty until you throw him at him again
00:05:28
until you wear him out this house is before or
00:05:32
on it a village, but the enivey builder does
00:05:35
n’t disappear for us anywhere, that is, he is simply a
00:05:37
constant at this dinner, we
00:05:39
created it, that is, I would say that it’s just
00:05:41
such a singleton, yes, that is, but he is a producer
00:05:44
data producer object of this factory,
00:05:47
probably we are on him Let's look at
00:05:49
builder in exactly this way and in
00:05:52
such a way that it will
00:05:54
generate this data for us, exactly the data
00:05:56
that we want, so let's
00:06:00
write this builder, let's start by
00:06:02
writing the keyword class, then
00:06:05
write player above them for us Bilderburg
00:06:07
Venus player
00:06:08
here and write def
00:06:12
its constructor by date with the help of someone
00:06:15
we create that I can do bombs do this is
00:06:17
what it will create like this it
00:06:19
will be a variable variable cut
00:06:23
which will be equal to simply because
00:06:25
jason walker now let's teach our
00:06:29
builds not to change the status with an eye, that is, we are
00:06:32
on fire builder so this is you there is set
00:06:35
status you will change the status to the
00:06:40
status that will come to you but but if it did
00:06:44
n’t come to you and then a
00:06:46
little heart comes to our aid found a little
00:06:50
heart on windows
00:06:53
users I’m in Russia and here it’s clear the status to
00:06:59
status c will be the active status by
00:07:03
by default, that is, buddy, you now
00:07:07
know how to make statuses change the status for
00:07:10
him transition some status if
00:07:13
he comes to me alone this is the one but
00:07:15
this one this us that status
00:07:18
outhouse what he should do he
00:07:20
should add a new field as a result of our empty
00:07:22
tokens under
00:07:24
the name I will not rewrite this with
00:07:28
this name the account status like this, that
00:07:31
is, it didn’t come ok it came from the same thing, they
00:07:34
just added a new field that we
00:07:37
should have for a piece and now the
00:07:41
attention itself we return to ourselves,
00:07:44
which means ourselves, that is, up to
00:07:48
1 comment under I saw in the last video
00:07:52
that the link sounded like a bad decision,
00:07:55
yes. I agree with you and agree and at the
00:07:59
same time you know in this in this
00:08:01
context sat down in we need it so that
00:08:03
we, firstly, we can, for example, do
00:08:06
several sets in a row, that is, we do a set
00:08:08
site there, one then there we
00:08:12
pass something on to them, we here in one the same object was returned to us,
00:08:16
that is, we
00:08:18
returned ourselves to be and before we cannot
00:08:20
do set 2 and then set 3 of some kind, that
00:08:25
is, so that we can do there
00:08:27
until we return our 30k, we are not
00:08:30
ready, that is, we we will return an
00:08:33
updated version of ourselves, that is, we
00:08:35
changed the roof and returned the house with a replaced
00:08:38
roof and is ready to continue to
00:08:40
change it, that is, when returning, I sat down in the
00:08:42
subway to talk with holes, they are further ok,
00:08:44
that is, we are changing the doors there too,
00:08:47
we are returning, let's look
00:08:49
further, yes, for example, the girls in this let
00:08:51
let our doors yes that is the king
00:08:53
otherwise balance and
00:08:56
balance and so here we accept the balance
00:09:01
is zero by default on
00:09:04
sell you
00:09:08
said
00:09:11
tomorrow south balance
00:09:15
balance and
00:09:20
everyone see a
00:09:22
small
00:09:24
comment in the comment receive
00:09:27
that is, consider again a simple example
00:09:30
for us this builds in the field I came, we will
00:09:33
ask, sorry brother, the status is such
00:09:35
hockey, we changed the status of the companies,
00:09:38
installed some kind of grid, it’s like it’s ready
00:09:40
where, but that’s not all.
00:09:43
please change it was on the chest that day went
00:09:45
shorter changed the balance he was like, well,
00:09:48
it’s all just a little bit more you want to change and
00:09:50
this is the moment when we
00:09:53
tell him no, man, everything is ready, thank
00:09:56
you from come on, the house is already ready, the
00:09:59
cinema halls are ready there and yours the car is ready,
00:10:02
so we need to write this
00:10:04
command, that is, we need it in order to
00:10:06
continue communicating with these
00:10:08
builders, but as soon as we have already received
00:10:11
everything we need from him, we are in time
00:10:13
for collecting thanks, then for this we
00:10:16
just need to write the bin command date drank and
00:10:20
here we’ll write
00:10:24
here we’ll write that he’s in the middle, he’s
00:10:28
basically just sending
00:10:29
the fields once, wrote
00:10:32
the number of the hall, everything is clear and clear, that
00:10:37
is, that’s essentially all that’s needed, yes, that’s
00:10:39
how much let’s now add from 100 to something, that
00:10:41
is, ours according to our
00:10:44
data convention in our object, the code for this angels
00:10:48
should also have to change the avatar, that
00:10:51
is, the set is like this,
00:10:56
here the mass is like this,
00:10:59
if nothing was given to us, we put
00:11:03
google.com brother and sister, here's the art,
00:11:06
checking it says sat avatar
00:11:13
in parentheses
00:11:15
Ragna avatar excellent, so the chain with this we
00:11:20
We figured it out now, the most interesting thing is
00:11:22
our log alive object, that’s what we
00:11:29
should do to begin with, that is, here we
00:11:31
will do the following thing by default,
00:11:34
we write here
00:11:36
that the dancer of
00:11:39
the block was crying or for writing
00:11:43
this, we have an object in which there will be
00:11:45
delocalization she
00:11:48
goes to Europe what such dots chicco what
00:11:51
will happen next and
00:11:53
about the same.
00:11:55
dots of the norm, that is, like
00:11:59
this, this localization is now
00:12:01
beautiful and very easy to do, we
00:12:04
now need a new balance build and a candle,
00:12:07
and it’s so bad it’s
00:12:14
not clear, we’ll figure it out if only the
00:12:17
chypre jumping everything is fine, I’ll press ok,
00:12:20
so
00:12:22
let’s write when it’s scary
00:12:25
log before localizing the tumor
00:12:32
Sherlock or women, that is, we need to
00:12:34
write the same builder that will be
00:12:37
able to play localization will be much
00:12:39
easier, we will write the player class an eye for
00:12:46
then
00:12:48
and here attention is magic yes
00:12:52
no, hurry to us here we need to
00:12:55
install a library called
00:12:57
fighter
00:13:02
[music ]
00:13:04
so
00:13:11
after installation we can
00:13:13
use it and for this we just look for
00:13:16
[music]
00:13:22
then we write with a filter
00:13:26
and these are the things, that is, why this
00:13:30
library is needed, it can generate for
00:13:32
us random names, addresses,
00:13:35
even links to pictures, and select those things
00:13:39
and at first he said yes, that is,
00:13:41
such a thing as
00:13:42
the image image, something like this, he
00:13:48
pictures is also a test server, that
00:13:51
is, you make a request to Google duck,
00:13:53
there’s such a mess Jess, then there’s cars,
00:13:57
referring to the example 420 by 420 and that’s
00:14:02
when you make the request, well
00:14:03
I remember about this link in the middle, the domain will
00:14:05
definitely
00:14:06
get to us, it will return a picture of a
00:14:08
certain size and a certain
00:14:11
specific topic, that is, cars, cats
00:14:14
and dogs,
00:14:15
so that these, too, in my opinion, in the
00:14:18
north and ural image there is such a thing,
00:14:22
even today we will try this, what to smoke
00:14:24
and this is such a thing for generating data,
00:14:27
every time we will do something new,
00:14:29
no one will come up with optics, why should we have
00:14:31
a little variety, so
00:14:34
let’s go back when we
00:14:37
learned how to do something, create not only
00:14:39
generate a fighter,
00:14:40
and now the most interesting thing, that is, the essence the
00:14:42
fact is that we have English and
00:14:44
Russian localization and we
00:14:46
automatically need to create by default
00:14:48
no one there in both Russian and
00:14:50
English what we do we have here in
00:14:52
fringe such a thing
00:14:55
he
00:14:56
sat down fake equals his own term and
00:15:01
he will accept the fleet link
00:15:04
in this video, don’t notice cooling
00:15:07
because here, too, you need to add
00:15:08
lang brother, we want to receive long as an input,
00:15:12
and here now we write what
00:15:16
they have in common, in fact, look, it
00:15:18
accepts locally
00:15:21
by default by default, this is locally not a piano, in
00:15:23
fact, it is Irtysh that is, they get an
00:15:26
English locale, but we may not
00:15:28
transfer another Russian locality to
00:15:30
English, Russian wines will generate
00:15:32
English English this Francis
00:15:34
French Spanish Spanish we
00:15:37
will use this life hack here, that is, we
00:15:39
will simply accept flying here, yes
00:15:41
here we
00:15:43
import from with rc
00:15:46
generator probably localization player
00:15:48
localization and here
00:15:51
we write player localization like this and we’ll
00:15:54
pass it on to him for English and do
00:15:57
n’t pass it on to anything, but for Russian it
00:16:00
requires a
00:16:02
mushroom
00:16:04
n.e. like this, from there we also write the
00:16:10
localization player
00:16:11
ru ru,
00:16:16
that is, we transfer the localization inside the
00:16:19
lamers from here, super accepted,
00:16:22
generated a fighter object of this thing
00:16:24
that can make
00:16:26
all sorts of fake names and the
00:16:29
like, and now we just do sat down,
00:16:31
for example,
00:16:34
cut it once, the result is equal, not for example here we write
00:16:37
nick name we write
00:16:41
like the following taxis,
00:16:44
what is Solveig
00:16:49
for example, there is
00:16:53
damn it, we don’t even know there is
00:16:59
some scientific it was very
00:17:06
simple, just what again for us Venus, let’s
00:17:08
add ours, this one is super
00:17:12
for our builder, well, I just
00:17:14
defaulted and wrote what can be done in
00:17:16
fact, you can do a lot of things here so so
00:17:18
so
00:17:21
ddt campbell beat and
00:17:25
here accordingly peter rating 1 you
00:17:29
realized that
00:17:32
let's see what this thing is
00:17:35
beautiful for us how to do
00:17:37
here for example some kind of systems z is
00:17:40
I equal to it.
00:17:44
build is
00:17:46
so good but
00:17:49
nothing has been created because we need to
00:17:52
call these methods to fill
00:17:54
our pass with default values, this is
00:17:57
like another development option by the way,
00:17:59
it all depends on how you want to
00:18:02
work with this whole thing, that is, option
00:18:05
number, but it’s rushing to buy On this screen,
00:18:07
you will always have an empty
00:18:10
new array by default, and each time you
00:18:12
will need to call each of these methods and
00:18:14
either pass some values ​​to it and
00:18:18
dominate such an object, or
00:18:20
force it to immediately generate some kind of
00:18:23
default object and then
00:18:25
just modify some specific fields,
00:18:27
let them delete them
00:18:30
there, change something else, make
00:18:32
comments, everything, anything,
00:18:35
so here we will write some method
00:18:38
called the rss rss method,
00:18:43
which will move all these fields by
00:18:46
default
00:18:48
like this we will need to do
00:18:52
set status here
00:18:54
with
00:18:58
what else and balance yes
00:19:03
yes and in principle in principle everything in
00:19:07
principle everything at night we can do returns
00:19:09
to the act we threw we can go
00:19:14
further than sports and here here inside here
00:19:16
right here you can do this fire
00:19:19
speed as it was heard, by default you
00:19:22
will either have an empty array if you don’t
00:19:24
do this, or filled with the
00:19:26
default and role values,
00:19:28
if you call Russia here directly
00:19:31
in the constructor, and this way it
00:19:34
will fill your value on your array with
00:19:37
these values, by the way, that’s what it is
00:19:39
in fact, give it up,
00:19:42
that is, don’t use 1 floor,
00:19:45
don’t use Russia, there will be such an
00:19:48
array, a successful empty object, if
00:19:50
you use it grows, then it will be filled with
00:19:53
dense values, we write like this, yes,
00:19:57
the hall
00:20:01
.
00:20:03
localization
00:20:05
is equal to
00:20:07
this kind of beauty and every time we
00:20:10
will generate a new localization and
00:20:12
all this beauty for us, let's
00:20:14
see how it will look like all the
00:20:19
disabled sinners and 3 not
00:20:24
[music]
00:20:27
this is of course tough
00:20:30
NGS in my opinion they were not
00:20:35
mistaken like
00:20:40
that
00:20:44
at home, not at all behind the British
00:20:47
z
00:20:49
[music]
00:20:51
they indulge the object with us and it turned out like this, but
00:20:54
here it didn’t work out for us,
00:20:56
and really, I didn’t call this
00:20:59
soft method build here, too, we have an error
00:21:02
bill, this is build because we received the
00:21:06
wrong data, things like that that is, according to the
00:21:10
link to our given lot
00:21:13
tags Kyle Azari this is such a beauty
00:21:17
the meaning was generated such an object and now
00:21:20
nothing prevents us from doing here about
00:21:22
this set
00:21:23
balance 20 bucks
00:21:28
about avatar balance 20 dollars now set
00:21:33
status
00:21:36
some kind I will sell and with t that is, for
00:21:40
him personal cases dad, that is, this one has the
00:21:43
status of powder with you don’t need to change all this,
00:21:45
now you will have such a
00:21:47
class that will generate all this beauty,
00:21:49
that is, that’s all you
00:21:51
need,
00:21:52
everything will actually be inside now
00:21:56
let’s go back back into the past or
00:21:59
the future and integrate this whole thing
00:22:01
here in the test, I
00:22:03
have to get this weapon,
00:22:06
sat under tested this thing
00:22:11
for a bad fight since the player and
00:22:14
move it here
00:22:17
yes here we are all already so good
00:22:22
good and the dictator with this where is our
00:22:26
contest mod and in the context we create
00:22:30
we write texture bytes
00:22:36
we will simply call the default d&g
00:22:40
player
00:22:43
generator and
00:22:46
here we need to import our
00:22:50
heart and generator directly from the player player
00:22:56
and accordingly we will return
00:22:58
re-therm a
00:23:01
beautiful beautiful player dune we will
00:23:05
come back here then let's go now
00:23:08
our tests and about here
00:23:11
we’ll talk about
00:23:14
yyy and
00:23:19
[music]
00:23:21
for example Prince
00:23:24
preprint so so so
00:23:29
generator.
00:23:32
We are trying to run this test,
00:23:41
hear what we have next, you
00:23:45
yourself are the synod on what we have here, we
00:23:50
tested different nicknames for you, you see
00:23:52
she and Angela will give. Juvenal address 3
00:23:56
Haydon Maurice that is, this thing,
00:24:00
firstly, allows you to generate different
00:24:01
data plus types allow at least
00:24:04
different cases to allocate it to different
00:24:07
names different symbols you
00:24:09
can also hook something just randomly,
00:24:11
especially since it will fly out much more beautifully
00:24:14
plus easily link service yes
00:24:16
because we came here, changed one
00:24:18
center or changed a little structure
00:24:21
everything is already working differently
00:24:24
now regarding the
00:24:26
increased frequency, what is most likely
00:24:30
what you will encounter yes, that is, for example,
00:24:32
you need to test select and even
00:24:34
but look ms access pass just
00:24:37
Let's see a few cupcakes, yes, when you
00:24:40
need to test for sex with the whole world
00:24:43
set status, let's check that our
00:24:46
users are created with all
00:24:47
statuses, we take generate different
00:24:50
users, I'll just be princes so that
00:24:52
we can see what data comes to us, here's
00:24:55
the status what status arrives in the
00:24:59
act banner or that in active that is,
00:25:01
we checked with all the statuses of the next
00:25:04
case, we copy this beauty,
00:25:08
in fact, it can all be done with a bunch of
00:25:11
important parameters for clarity,
00:25:14
we will do it often, now we will check, for
00:25:17
example, in it with
00:25:21
ragamuffins in wrestling,
00:25:26
we will check that we have a balance and
00:25:29
are created, for example, separately somehow on the floors
00:25:34
height 1 meter method of limit values
00:25:38
on the level it’s called
00:25:42
so so so I don’t remember what it’s
00:25:44
called
00:25:45
boundary value of the
00:25:52
Moscow region or, well, in short,
00:25:54
thanks to the extreme value test it
00:25:56
for example there are the number of characters and but
00:26:00
he and we will try to
00:26:02
test the balance on a cell Yulin balance
00:26:05
for example with -10 there and
00:26:08
and
00:26:10
the balance is there psd only here there is no longer a
00:26:13
status for them to do the actual set
00:26:15
balance
00:26:18
rand with Samsung
00:26:21
[music]
00:26:24
so
00:26:26
uses the number gaming balancing so
00:26:29
we balance it was and the guys will give here
00:26:33
the balance of singing and here the status places on the
00:26:36
basic
00:26:38
recipe is a classic bang, he is a prince and
00:26:42
control and we launch it
00:26:44
to the balance here and here there is no need, that
00:26:47
is, the usual satori which sits down
00:26:49
the designation you actually do the whole thing with them
00:26:51
and all the beauty to pull off
00:26:54
such life hacks, for example, check
00:26:56
that an account will not be created, well, let’s assume
00:26:59
all these fields the army's mandate that acanthus be
00:27:02
created if some of these fields are not there,
00:27:04
that is, you simply generate a
00:27:07
bypass here, for example, let's write what options we have so well
00:27:13
so let's copy here
00:27:16
we will have an asset status
00:27:20
then we will have a balance
00:27:23
there localization
00:27:29
organization and avatar and
00:27:34
amateur actually yes so we
00:27:37
will have it for example
00:27:47
here we write for example
00:27:50
[music]
00:27:58
equals this can just a machine generator of
00:28:07
brackets when it is convenient excellent
00:28:10
Kafka stitching delete here on the back of the children
00:28:14
case we will do now the
00:28:17
turn we will delete these keys dr.web
00:28:20
us and great and here
00:28:25
the baseboards we will take turns removing each of
00:28:28
these things and see how the
00:28:31
bag and react to the fact that this is the mandate of the ballot box for
00:28:33
inclusion is enough answer avatar
00:28:35
balance localization than gifts him
00:28:38
account status avatar localization
00:28:41
balance does not have the principle of all
00:28:43
these logs here
00:28:44
that is at a minimum, with such a thing
00:28:47
you can just here a default example
00:28:49
for these things they can do
00:28:52
anything that comes up with a request for ambergris and
00:28:55
services, even authorization, in
00:28:58
fact, one more thing that I
00:29:01
wanted to show you is working with
00:29:04
these mine localization that is
00:29:07
how to change or prohibit this
00:29:09
beauty all for this you will
00:29:12
need the following thing, that is, you
00:29:14
just need to write another method
00:29:16
let's here
00:29:17
d
00:29:22
let's not even give not so update and
00:29:31
between the two on and the world and the world a
00:29:36
generator for that yes, you can only
00:29:38
localize, maybe you can have
00:29:40
anything, not
00:29:44
just localization, but that means somehow,
00:29:47
and in short,
00:29:51
let’s vocalization 2 and localization of
00:29:54
some kind, but the last name is not be it, that is, there
00:29:57
may be a lot of these constructors,
00:29:59
you need to update some yours, that
00:30:02
is, for this, first you write here in
00:30:04
something like this,
00:30:06
but the fleet must accept two
00:30:09
parameters rv parameter is the key the
00:30:13
second parameter is, in principle, a generator, this is the
00:30:16
one that we are still writing posts,
00:30:19
although in fact we can already change the thread
00:30:20
I cut this key and the
00:30:26
generator
00:30:28
.
00:30:31
squirrels
00:30:32
are the region,
00:30:35
that is, we are essentially saying that for example,
00:30:37
for objects from the locale, for their heat, the ride is
00:30:40
local, and I, this generator
00:30:43
flies to him, that is, this is the generator
00:30:44
in our case, he
00:30:46
flies in like call his build and
00:30:49
replace it in this key our new object
00:30:52
let's check them out with you
00:30:55
another one will give for example
00:30:58
damn yes I will it's still a committee project
00:31:02
other guys king summer all the other ladies
00:31:05
basically we either look at everything so
00:31:07
here at least we call it somehow
00:31:09
normal at the end
00:31:12
akinina like that do not do it at all please do it
00:31:14
just for tests did it for an
00:31:16
example of dismantling do it.
00:31:18
so for this beauty, we can delete
00:31:21
this thing, we got our generator,
00:31:25
let’s ban my
00:31:28
X-ray player generator,
00:31:32
so here we have,
00:31:35
well, let’s turn this image
00:31:46
beautifully to get data both
00:31:49
before and after,
00:31:55
because if we shot it down, I don’t
00:31:58
believe that maybe it’s available since
00:32:04
I’ll probably use it, we’ll add it, I
00:32:08
’ll try in the shady park, okay, let’s
00:32:11
try to do it, I’m thinking,
00:32:13
it turns out I’m thinking, I lost,
00:32:17
yes, it’s not a rotary, here’s
00:32:20
the sex
00:32:25
there now, I’ll expand it a little,
00:32:28
change it, we’ll cry
00:32:31
about what he and I won’t push we
00:32:34
will decide
00:32:36
so we will need them here
00:32:41
and they don’t have a board resort without rc
00:32:45
generator play localization localization like this like this like
00:32:49
that I cried and here
00:32:54
in fact you can do a lot of all sorts of
00:32:57
interesting things you can install
00:32:59
only one localization let’s
00:33:01
change it and by the way to essentially y us
00:33:03
default codes it will be this thing will
00:33:05
always generate delocalization we will
00:33:08
immediately replace it in English localization we
00:33:11
will know for sure and it won’t be
00:33:13
necessary to stand on end they won’t serve anything
00:33:15
so actually what we need to
00:33:18
do now is to oblige us to
00:33:21
change this localization that is we are not
00:33:23
in a hurry player localization
00:33:26
power localization yes, in principle, all
00:33:30
ultrasound is not just in some locale and,
00:33:33
in principle, my command to translate
00:33:36
give some kind of Spanish for sure there will be Spanish
00:33:40
content now let's have French there for
00:33:43
sure I remember the FRS there but let's
00:33:46
try this whole thing
00:33:53
let's run like this like this print the object son and
00:33:57
see how it will all just
00:33:59
look like this
00:34:02
with the top from the inside will be build
00:34:05
so we passed here
00:34:09
include
00:34:12
one attribute of the belt that you muscle
00:34:15
start
00:34:16
French localization
00:34:24
that is, you will pass this object like
00:34:29
this now I'll
00:34:34
set the inject
00:34:38
attribute in a minute do
00:34:42
French
00:34:44
about what started so stupid and now
00:34:48
Valentina is most
00:34:51
likely due to the fact that his
00:34:52
advanced Jason and
00:34:55
give it suppressed behind the brackets for what the
00:35:00
splinter
00:35:02
yes it’s all because of the brackets
00:35:05
la colline no some kind of than gave yes
00:35:10
because I’m taking in brackets so
00:35:12
it turned out to be three gave me a generator I
00:35:14
gave the capa generator wrapped brackets
00:35:17
he said so brother I don’t know that
00:35:20
well and now we are missing here
00:35:23
in front of the parameter yes that is, we will make
00:35:27
beauty
00:35:30
exactly
00:35:34
n
00:35:38
equal and
00:35:43
not nickname here is such a router here
00:35:46
with its own On your part, you can
00:35:49
do here any simple rings
00:35:53
updater of any data like a generator in
00:35:56
any complex objects you just need to
00:35:58
write the correct structure and all this
00:36:00
will work for you and here you
00:36:02
can make progress about calling some
00:36:04
setters and in the end just call build
00:36:07
too let's write here
00:36:10
I'm our
00:36:12
player localization
00:36:15
here we'll write for example some kind of
00:36:18
DFS
00:36:20
to issue numbers for us to
00:36:27
find out 11
00:36:32
Peter sat down and
00:36:36
at the same time sal.
00:36:39
cut
00:36:41
here we will write to us
00:36:43
equal to
00:36:45
us and at the same time
00:36:48
we will not call it, that
00:36:50
is, we will add it only
00:36:52
if we call and let’s run it again
00:36:57
here we are vulnerable
00:36:59
if we write here from the bottom to
00:37:02
15
00:37:04
that again
00:37:06
appeared on board,
00:37:09
that is, with the help of these little things you
00:37:12
can add an object from me and
00:37:15
anything you like can be written here to
00:37:17
transmit, for example, an empty value of
00:37:19
some data, you can also
00:37:23
change the bender here accordingly so that it is
00:37:26
not some kind an atomic piece
00:37:28
like this, it’s about the whole of me,
00:37:32
this is the whole object, that is, everything is
00:37:34
in your hands, so take this
00:37:36
thing, imagination is bad useful and
00:37:40
I hope you were interested in this about
00:37:43
which we’ll add all the cats to the sword to the
00:37:47
project, so try clicking if
00:37:50
you have other options for such a
00:37:51
data generator, I’ll also be glad to hear it,
00:37:53
besides the comment, let’s look at it,
00:37:56
you can figure it out, it’s interesting, we’ll come up with everything
00:37:57
together and we’ll submit 2 million, that’s it,
00:38:01
thank you all for watching,
00:38:03
try it and you’ll be able to
00:38:05
clear everything officially

Description:

Рассмотрим самый простой билдер с небольшой фишкой в конце, о которой мы поговорим детальнее в следующем уроке. 00:00 Пишем простенький и элегантный билдер для генерации данных 00:10 Что же мы будем рассматривать в рамках урока? 00:30 Разбираемся с идеей видео 03:50 Приступаем к написанию билдера 04:20 Что такое builder? 06:02 Реализовываем первые кусочки builder 11:30 Описываем localize билдер в рамках другого билдера 17:30 Тестируем наш билдер 22:20 Интегрируем наш билдер в тесты 24:40 Проверям работу билдера в тестах 29:08 Работа с localize билдером 38:00 До новых встреч test data #генерация #тестовых #данных

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Урок для начинающих по PyTest #7.1 | Пишем простенький и элегантный билдер для генерации данных" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Урок для начинающих по PyTest #7.1 | Пишем простенький и элегантный билдер для генерации данных" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Урок для начинающих по PyTest #7.1 | Пишем простенький и элегантный билдер для генерации данных" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Урок для начинающих по PyTest #7.1 | Пишем простенький и элегантный билдер для генерации данных" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Урок для начинающих по PyTest #7.1 | Пишем простенький и элегантный билдер для генерации данных"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Урок для начинающих по PyTest #7.1 | Пишем простенький и элегантный билдер для генерации данных"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.